Updated

Germany great Toni Kroos officially bid farewell to soccer on Sunday, two days after his team’s dramatic loss to Spain in the quarterfinals of Euro 2024.

Substitute Mikel Merino's game-winning goal in the last minute of extra time handed Spain a 2-1 victory, knocked out the host nation and ended Kroos' career.

"So that’s it," Kroos wrote in a post on Instagram on Sunday. "But before I take a break and at least try to realize what happened over the last 17 years I don’t want to miss the opportunity to say thank you to everyone accepting me how and who I am."

The 2014 World Cup winner went on to thank his fans, clubs, coaches and teammates, as well as his friends and family, adding that there is "nothing better (than) to see your kids being proud of daddy."

He also sent an apology to Spain youngster Pedri after causing him to miss the remainder of Euro 2024 following a hard challenge in the quarterfinal game. Pedri sustained a knee injury during the contact, and is unable to continue in the tournament.

Pedri expressed his heartfelt thanks to Kroos for the apology, writing on social media: "Thank you Toni Kroos for your message. This is soccer and these things happen. Your career and your record remain forever."

Pedri had to come off in the eighth minute of Friday’s match, thanks to Merino's game-winning goal in the last minute of extra time — set up by Pedri’s replacement Dani Olmo, who had netted the opener.

Pedri will stay with the Spain squad for the rest of the tournament: Tuesday’s semifinal against France and the final five days later — against either England or the Netherlands — should Spain get there.

"I came to Germany for Euro 2024 and I will continue here, until the end," Pedri wrote. "Because, do not doubt it, the dream continues. This week it’s time to encourage and contribute in another way to this great family that is Spain. Their support and that of all of you is incredible. The hardest moment has passed and the road back has already started, to soon be at full strength with Barcelona."

Kroos won a host of titles, mostly with Real Madrid, but also with Bayern Munich — six Champions Leagues, four Spanish leagues, three Bundesligas, three German Cups and one Copa del Rey.

The 34-year-old Kroos announced in May that he would retire at the end of Euro 2024.

That meant that his 114th match for Germany turned out to be his last.

Kroos ended his post with the words: "last but not least: Thank you Football! You beautiful game. And… you‘re welcome! Over and out."

The Associated Press contributed to this report.

[Want great stories delivered right to your inbox? Create or log in to your FOX Sports account, follow leagues, teams and players to receive a personalized newsletter daily.]