November 5, 2022 | 10:01pm

Hilary Duff penned a touching tribute to her ex-boyfriend Aaron Carter after his death Saturday.

“For Aaron- I’m deeply sorry that life was so hard for you and that you had to struggle in-front of the whole world,” the “Lizzie McGuire” alum, 35, wrote via Instagram.

Hilary Duff paid tribute to her ex-boyfriend Aaron Carter after his death.
Getty Images

“You had a charm that was absolutely effervescent … boy did my teenage self love you deeply.”

Duff concluded her message by telling Carter to “rest easy” and “sending love” to his grieving family.

The former couple started dating in 2000 when they were both 13 years old. They were together on and off for three years, ultimately breaking up for good after an infamous love triangle with Lindsay Lohan.

“I just got a little bored, so I went and I started getting to know Lindsay, dating Lindsay,” Carter admitted on CNBC’s “The Big Idea with Donny Deutsch” in 2005, adding that Duff “really got her heart broken,” which he felt “sorry” about.

The “Aaron’s Party” singer was found dead in his California home Saturday morning.
Arlene Richie/Shutterstock

After the “Younger” star grew up and started a family years later, the “Aaron’s Party (Come Get It)” singer continued to express regret over how he had treated her.

“I’ll spend the rest of my life trying to better myself to get back to her,” he wrote in a since-deleted tweet in 2014. “I don’t care what ANY of you think.”

Duff reacted to her ex’s public declarations of love later that year, telling BuzzFeed“He keeps doing that. I don’t know how I feel. I mean, that was so long ago. … [We] don’t know each other [anymore].”

Carter also appeared in a 2001 episode of Duff’s show “Lizzie McGuire.”
Getty Images

Carter eventually moved past his feelings for the “How I Met Your Father” star. He got engaged to Melanie Martin in 2020, and they welcomed a son named Prince in 2021.

But the former child star — who was the younger brother of Backstreet Boys member Nick Carter — struggled with addiction and family trauma in the final years of his life.

The former couple dated from 2000 to 2003.
FilmMagic

He was found dead Saturday morning in a bathtub at his California home at age 34.

“Aaron worked very hard towards the end of his life in recovery, to be a good father and to make amends with his family,” his rep told Page Six.

The cause of death has yet to be determined.