Two weeks before he slaughtered 12 people at the Washington Navy Yard, a desperate-sounding Aaron Alexis told an online “mind control” outreach group that the Navy was targeting his brain with extremely low frequency waves, according to a series of e-mails obtained exclusively by The Post.

“My name is Aaron. I am ex-navy,” Alexis begins his correspondence with the group, Freedom from Covert Harassment & Surveillance, in the first of three emails dated Sept. 1.

“I fear the constant bombardment from the ELF weapon is starting to take it’s[sic] toll on my body,” confided Alexis, an honorably discharged Navy reservist and a Department of Defense computer consultant.

Just 15 days later, on Sept. 16, Alexis used his high-security clearance to enter the yard’s Building #197, where he strafed a terrified crowd of Naval workers with his new Remington pump-action shot gun — with “My ELF Weapon!” hand-scratched into the firearm’s stock – and a handgun he picked up off a fallen guard.

He was eventually gunned down by authorities after a 30-minutes standoff.

The Alexis e-mails, sent from aalexis654@gmail.com, offer the most in-depth window yet into the twisted murderer’s panicked mind.

They also suggest that the bloody rampage was plotted as a revenge attack against the US Navy — contrary to FBI statements that the former sailor did not appear to have had a specific target.

“I have what I believe to be the locations for where they’ve been developing these weapons for decades,” Alexis tells the group’s president, Derrick Robinson, in one of the emails.

“The ELF weapons are part of the weapons systems of most of the modern vessels fielded by the Navy,” Alexis wrote.

The Navy has long acknowledged that it uses ultra low frequency signals in submarine communications; conspiracy theorists insist that the technology has also been “weaponized” by shadowy government and quasi-government groups.

“That’s what he’s alleging in his e-mails that the Navy has been conducting ELF research, and that they are using these technologies on citizens, and that he is one of the victims,” Robinson, of Upland, CA, told The Post after sharing the e-mails.

“That is the reason he did this, apparently.”

The first e-mail begins with an introduction, followed by a description of his earliest perceived ELF “attack,” from August. Police reports from that incident record Alexis telling the cops that while on Department of Defense assignment in Newport, RI, he had to change his hotel three times because he believed unseen people were talking to him via microwave signals.

“I have recently come under attack after blowing up at Norfolk airport in Virginia,” he writes.

“The first attack started coming when I was on assignment in Rhode Island. I was hearing what I though was people next door telling lies about me. In truth I didn’t know that I was under attack and thought I could escape what I was experiencing, by leaving the hotel I was in. It wasn’t until it almost cost me my job that I realized that one, I wasn’t crazy, and that two that I had to figure out what was going on.

“I am glad I found this site, however I need assistance because, I have not allowed them to scare me off my job, but I fear the constant bombardment from the ELF weapon is starting to take it’s toll on my body. I am currently in DC now near the pentagon. I think I know the specific group in the military that is responsible for developing and assisting the military with.

The first e-mail concludes,

“Any assistance you can give me and at the same time what ever info I can give you on what I know please contact me ASAP.

“Aaron Alexis”

Shortly after Robinson sent back a “Thanks for writing to us” response — telling Alexis “Feel free to join our efforts to gain freedom from the matrix,” Alexis wrote his own one-paragraph response:

“Derrick, I have what I believe to be the locations for where they’ve been developing these weapons for decades. The ELF weapons are part of the weapons systems of most of the modern vessels fielded by the Navy. I want to become part of this effort mostly for self preservation. The voices they’ve induced into my head are tiresome. However If I can figure out how to keep them from disturbing my sleep cycles I would be most interested to find out.”

Robinson responds again, offering to hook Alexis up with “a good support network in the DC area, and asks Alexis if he has access to “any of the technologies being used against us?”

In his last reply, Alexis answers,

“I don’t have direct access to the equipment, how ever I do have knowledge of where some of the attacks might be coming from. I don’t want to call you from my phone, they record everything I’ve been saying. And because I’m under the employ of the DoD I don’t want to risk getting you or my self in trouble. If you can send me info on who to get in touch with, like addresses, I think would be better.”

When Robinson then asks if Alexis would like to communicate by instant message. Alexis never responded.

Alexis’s e-mails didn’t raise any alarms, as they made no mention of violence or suicide, said Robinson and the group’s vice president, Timothy White, of The Bronx.

“He wasn’t that bad,” White said. “We have many, many people who call and they are on the verge of suicide.”

Added Robinson, “I would have tried and we all would have tried our best to talk him out of any act of violence, if we had known about his intentions.”

The FBI, meanwhile, on Wednesday stood by its previous statements that Alexis’ rampage was a random act.

“The statements we’ve already put out regarding motive and not believing he had any specific targets — we’re not changing anything there,” said Lindsey Godwin, a spokeswoman for the FBI’s Washington field office.