Hosts Germany will face Scotland in the opening match of Euro 2024 in Munich following the draw on Saturday, while defending champions Italy will be in the same group as Spain.
The Germans, three-time winners, will kick off the one-month tournament in Munich on June 14, with the final on July 14 at Berlin's Olympic stadium.
Germany will also play Hungary, which came through the qualifying campaign unbeaten, and Switzerland in Group A.
"It's no group of death but a very strong group and we are looking forward to it," Germany manager Julian Nagelsmann said.
The hosts appointed Nagelsmann as manager in September after parting ways with Hansi Flick following a 4-1 home defeat against Japan, the team's fourth loss in five games.
The team beat France under Rudi Voeller, but after Nagelsmann began with a win over the United States they lost to Turkey and Austria.
"I am optimistic that if we do some things in the coming few months then we will play a good Euro. The first game also has a special kind of pressure," said Voeller, the national team director.
"We still have some problems but I am convinced that Julian Nagelsmann will do it," Voeller added.
Italy has a tough task to defend their title after being drawn in Group B along with Spain, Croatia and Albania.
Italy defeated Spain on penalties in the semifinals on their way to winning Euro 2020. Croatia reached the semifinals at the last World Cup.
"Yes, it could have been better," Italy manager Luciano Spalletti said.
"Being in the fourth pot makes you realize that you have teams ahead of you but nothing should distract us from the fact we are Italy.
"A tough group, Albania showed that they know how to stay on the pitch. Croatia is strong and experienced," Spalletti added.
Spain's opening game is against Croatia and its second contest will be against Italy.
"If it's not the toughest group, it's one of the toughest," Spain manager Luis de la Fuente said.
"Italy are European champions, Croatia always reach the later stages and although they are not at their best, they are two historic teams. And don't forget Albania, top of their group."
France and the Netherlands will meet again after coming through qualifying in the same group. They were drawn in Group D alongside Austria and the winners of playoff A.
France, which won both games against the Dutch on their way to topping the qualifying group, kicks off its Euro 2024 campaign against Austria in Dusseldorf.
"The Pot 3 team we’ll be facing are The Netherlands. ... We won both our games against them but it makes our group harder. We also faced Austria during the latest Nations League campaign and it was far from easy. It’s a dense and difficult group," France coach Didier Deschamps said.
England, the runners-up at Euro 2020, is in Group C alongside Denmark, Slovenia and Serbia. England, which needed extra time to see off Denmark in the 2020 semifinals, will start the tournament against Serbia.
"You look at Serbia with a center forward like Aleksander Mitrovic and then you have to be careful not to assume anything when you see these draws, that's for certain," England manager Gareth Southgate said.
"You can look at it on paper but the games aren't played on paper. There are some teams that you are glad to avoid in Pot 3 and Pot 4 but all of the teams that we play are more than capable."
In Group E, Belgium will face Romania, Slovakia and the winners of playoff B: Israel, Bosnia, Ukraine or Iceland.
Portugal is in Group F, alongside Turkey, Czech Republic and the playoff C winners, one of Georgia, Greece, Kazakhstan or Luxembourg, who finished third in Portugal's qualifying group.
The top two in each of the six Euro 2024 groups proceed to the round of 16 along with the four best third-placed finishers.
The draw was held at the Elbphilharmonie concert hall in Hamburg, one of the 10 host cities of the tournament.
With your current subscription plan you can comment on stories. However, before writing your first comment, please create a display name in the Profile section of your subscriber account page.