The deranged Fort Hood gunman – accused of killing 13 people and wounding 29 others – snapped after being dumped by a lover, The ENQUIRER has learned exclusively.

Authorities say Maj. Nidal Malik Hasan – an American-born Muslim of Palestinian descent – became deeply disturbed over his imminent deployment to Afghanistan. But his final decline into madness was triggered by his miserable failure at romance.

While the investigation is being kept under tight wraps, a top government source, close to the case, told The ENQUIRER: "There’s evidence he was dumped by a lover."

The ENQUIRER has also learned the 39-year-old Army psychiatrist had a deep-seated inability to deal with women that stemmed all the way back to high school – and he may have had homosexual relationships.

"Hasan had someone he was seeing – a woman or even a man – or may have imagined the love affair," disclosed the government source. "It’s quite possible the object of his affection had no idea they were Hasan’s love interest.

"What’s clear is that Hasan felt he was dumped by this person, giving him another reason for unleashing his mass assault. In his sick mind, Hasan may have believed that one of these innocent men he gunned down stole away his lover."

The New York Times reported that Hasan told his cousins that he planned to marry "sometime this year" – but he was not known to have ever had a girlfriend, say relatives.

Before being transferred by the Army to the Fort Hood military base in Texas four months ago, Hasan spent six years doing his medical training and working at the Walter Reed Army Medical Center in Washington, D.C.

The lifelong bachelor frequented a local mosque and signed up for a Muslim matchmaking service. "His first choice was an Arab woman," said former Imam Faizul Khan, who disclosed that Hasan didn’t like any of the women available through the service.

At Walter Reed, the major refused to be photographed with women at some work-related events despite  frequenting a strip club as reported EARLIER.

Imam Mohamed Abdullahi, who runs the Muslim Community Center in Silver Spring, Md., where the psychiatrist attended prayer services, told The ENQUIRER Hasan may have been confused about his sexuality.

"Maybe he is a homosexual. He was clearly very troubled. In the Koran, there was a messenger who was a homosexual, and God destroyed him."

Among Hasan’s belongings, confiscated by police at his apartment, was a cache of HIV prescription drugs.

For the full story with all the details pick up the new ENQUIRER.