Former Union winger Ilsinho, whose wizardry on the ball at right wing made him a fan favorite at Subaru Park, announced his retirement from playing on Wednesday.

The 36-year-old Brazilian, full name Ilson Pereira Dias Júnior, came to Philadelphia in 2016 after playing for three big Brazilian clubs — Palmeiras, São Paulo and Internacional — and Ukraine’s Shakhtar Donetsk. It was at Shakhtar that Ilsinho made a name for himself beyond his home country, playing 19 games in the UEFA Champions League and 15 in the second-tier UEFA Cup and Europa League.

Shakhtar lost a lot of those games, but Ilsinho scored a memorable goal in a Champions League home game against Barcelona in 2008.

After joining the Union, he ended up spending six years here. He played 144 games, the second-most of any club in his career, and delivered 22 goals and 18 assists. Some of those goals will live long in Union fans’ memories, especially a two-goal night against the New York Red Bulls that led a 3-2 comeback win.

Ilsinho battled many injuries while with the Union, and even when healthy he rarely had 90 minutes in the proverbial gas tank. But his creativity and guile made him a constant threat on the ball, and allowed Jim Curtin to vary the Union’s tactics in games between 4-4-2 and 4-2-3-1 formations. Opponents often knew what was coming, but Ilsinho still got the better of them.

“While the decision to retire was hard, I am so full of gratitude for my time spent on the pitch and to the people that have gotten me here,” he wrote in a farewell message on Instagram.

“Thank you to the fans for their unwavering support throughout the years,” he said. “To all my teammates who fought alongside me on field and became family and friends off it. To the coaches and staff who believed in me and gave me a chance, and most importantly to my family who sacrificed so much to have allowed me to have such a long, successful career doing something I loved.”

The Union will honor Ilsinho with a pregame ceremony before Saturday’s game against the San Jose Earthquakes at Subaru Park (7:30 p.m., PHL17).

» READ MORE: An analysis of the Union's 2022 roster