TV legend MARY TYLER MOORE is exhibiting symptoms similar to dementia and Alzheimer’s dis­ease, and friends fear she could be dead in three months!

Sources say the 77-year-old actress’ failing health has led to a heartbreaking nursing home drama, with Mary refusing to enter a facility.

Her alarming mental “deterio­ration” comes just months after The ENQUIRER reported that Mary’s marriage had exploded amid a shocking series of “domestic inci­dents” at her Connecticut mansion.

“I think Mary may be struggling with something like dementia or Alzheimer’s. It’s so sad,” an insider told The ENQUIRER. “I fear she has only three months to live, and she may not last that long if she isn’t put into an assisted living facility where she can get around-the-clock care.

“But Mary has protested, saying ‘I won’t go!’”

Despite that, sources say friends are urging Mary’s husband, Dr. Robert Levine, 59, to place her in a facility after a series of incidents and accidents sent police and med­ics racing to their Greenwich home numerous times in recent years.

“So far, Mary won’t hear of it,” said another insider. “When she’s more lucid, she says that she wants to live out her final days there. But the house has turned into a danger trap because she often walks around in what looks like a state of confusion.”

As The ENQUIRER has reported, Mary has suffered two nasty falls at her home. In one 2013 tumble, she broke a hip and fractured a shoulder. She was hospitalized and then developed pneumonia.

In a previous fall, the once-perky star – an Emmy winner on “The Dick Van Dyke Show” in the ’60s and “Mary Tyler Moore” in the ’70s – crashed down four stairs, shatter­ing her collarbone and several ribs.

Mary eventually recovered from both accidents, but they joined a long litany of recent health woes, including vision loss and heart and kidney problems. She also required risky surgery in May 2011 to remove a benign brain tumor, followed by further surgery to control bleeding in her brain.

The Hollywood icon has battled Type 1 diabetes for four decades and suffered several serious complications as a result.

Adding to her troubles, as The ENQUIRER reported, police responded to two dis­turbing “domestic incidents” at her $12 million gated com­pound in January.

According to a police report dated Jan. 19: “Wife states her estranged husband is refusing to leave house. She states he co-owns the home but normally does not reside there.”

Four days later, three police units rushed back to the couple’s home at 3:53 p.m. and encountered a “verbal dispute” between Mary and her husband, according to the officers’ report. Since then, it looks like Mary’s mental condition has deteriorated, sources say.

In a rare recent outing, Mary and her husband shared a meal at an upscale restaurant in Greenwich.

But she alarmed staffers and pa­trons alike with her seemingly odd behavior.

“She appeared dazed and con­fused,” revealed a staffer at the swanky eatery. She kept looking wide-eyed around the dining room as if she wasn’t quite sure where she was. She only calmed down when her husband reached across the table and held her hand.”

After repeatedly forgetting what she’d decided to eat, Mary finally ordered soup as an appetizer, said the source.

“She dribbled some down the front of her blouse, but she seemed unaware of it,” said the source. “Her husband dunked a napkin in a glass of water and wiped her chin.

“It was heartbreaking. It appears she may have some mental issues.”

Mary’s apparently “diminished” mental capacity is all the more reason she needs to be in a nursing home, said the source.

“Her home is dangerous with lots of stairs, marble bathrooms and a swimming pool,” noted the insider.

“With her medical problems, something awful will happen if she stays there. It’s imperative that she go into a nursing home.

“There’s terrible fear the world will lose her by the end of the year. We’re praying that doesn’t happen.”