AFTER years of bitterness, sources say TED KENNEDY’s ex-wife and widow have buried the hatchet!

Booze-troubled Joan Kennedy and Victoria Reggie were at such odds they totally avoided each other at Ted’s funeral in August 2009. But insiders say the death of Ted and Joan’s daughter Kara prompted them to mend fences.

“It’s true that Vicki and Joan never got along while Ted was alive,” noted a friend.

“Their animosity toward each other was evident at his funeral rites, but in the years since, Vicki has reached out to Joan.

“What brought them close was Joan’s unimaginable grief over losing Kara.”

Another pal added: “When Kara died, Vicki extended an olive branch to Joan. Joan reluctantly welcomed her, and the two have since grown close.”

Kara suffered a fatal heart attack in September 2011 and died at a Washington, D.C., health club after her daily workout. She was just 51 and left behind two children and an ex-husband.

She’s survived by her brothers, lawyer Edward M. “Ted” Kennedy Jr., 52, and former Rhode Island congressman Patrick Kennedy, 46.

Before Kara’s tragic death, Victoria apparently had very little sympathy for 77-year-old Joan, a longtime alcoholic who struggled to fit in with the Kennedy clan.

“But Kara’s passing upset Vicki greatly and she felt real sympathy for Joan, who lived alone in Boston,” said the first source.

“Vicki’s been concerned that Joan might fall off the wagon again and has repeatedly checked on her.”

Meanwhile, Vicki, 60, has not remarried and is active in politics. In February, President Barack Obama nominated her to serve as a governor for the U.S. Postal Service.

“Vicki will no doubt see Joan this summer and together they’ll mourn Ted on the fifth anniversary of his passing,” said the friend.

“You have to think Teddy would be happy that they’re friends and he’d be looking down, smiling.”