MILAN (AP) — Veteran AC Milan forward Zlatan Ibrahimović announced his immediate retirement from soccer at the end of an emotional night at San Siro on Sunday.

Ibrahimović was out of contract with the Serie A club at the end of the season and Milan had already announced there would be a special ceremony after its match against Hellas Verona to bid farewell to the 41-year-old Swede.

But Ibrahimović later revealed in a news conference that no one knew the big news he was about to drop.

“Even my family didn’t know, because I wanted that when I announced it everyone heard it at the same time,” he said.

Ibrahimović was given a guard of honor by his teammates as he walked out after the match at San Siro. He struggled to hold back the tears as he took the microphone and said: “The time has come to say goodbye to soccer but not to you.”

Ibrahimović scored 93 goals in 163 appearances over two spells at Milan. He returned in January 2020 and helped Milan win the Serie A title last year — his second league trophy with the Rossoneri.

But he has struggled with injuries and only made four appearances this season, after undergoing a knee operation last year.

“I have so many memories and emotions inside this stadium,” Ibrahimović said. “The first time I arrived you gave me happiness, the second time you gave me love.

“I want to thank my family … I want to thank my second family: the players. I want to thank the coach and his staff for the responsibility, I want to thank the directors for the opportunity. Last but not least, from my heart, I want to thank you fans.”

He also enjoyed trophy-laden spells at Paris Saint-Germain, Inter Milan, Barcelona, Juventus and Ajax, having started his career with hometown club Malmo.

He made 122 appearances for Sweden, scoring 62 goals.

Many of the fans at San Siro on Sunday were in tears, as were most of his teammates, who were all wearing jerseys with his name and squad number on the back.

Ibrahimović told reporters he struggled to find someone who wasn't crying as he looked around during his speech for someone to help give him the strength to stem his own tears.

Ibrahimović also couldn't resist making a joke.

“I woke up this morning and it was raining, and I thought ‘Even God is crying,’” he said with a smile.

There were emotional scenes even before kickoff as a giant banner was unfurled at one end of the stadium with the words “Godbye.” The fans chanted his name and Ibrahimović was moved to tears as he cupped his hands in the shape of a heart and blew kisses to the supporters.

However, he ended his speech with a smile and in typical Ibrahimović fashion.

He said: “It’s too difficult, there are so many emotions going through me now. But I will say, ‘I’ll see you around, if you’re lucky.’”

Ibrahimović then walked around the stadium to the song “Simply the Best.”