SEATTLE (AP) – A mentally ill petty thief pleaded guilty Thursday to federal charges that he joined another man in planning to attack a Seattle military recruiting station with machine guns and grenades — a plot inspired by the 2009 massacre at Fort Hood, authorities say.

“Why don’t we all just go into there with guns blazing and just lay everybody down,” Walli Mujahidh allegedly said in one conversation recorded by investigators. “Whoever gets laid down, gets laid down.”

The 33-year-old from Los Angeles faces 27 to 32 years after pleading guilty to three charges: conspiracy to kill officers of the United States, conspiracy to use weapons of mass destruction and unlawful possession of a firearm.

“The FBI is pleased that Mr. Mujahidh accepted responsibility for his actions, but this case remains a chilling reminder that there is constant work to be done,” said Laura M. Laughlin, special agent in charge of the agency’s Seattle office.

Mujahidh has a long history of “chronic, relentless” mental illness, including 12 stays at psychiatric hospitals, said his attorney, Michele Shaw. He has been diagnosed with schizoaffective disorder with bipolar tendencies, she said.

“Walli is very ashamed of his behavior and has wanted to accept responsibility for his participation,” Shaw said. “He had a fundamental misunderstanding of Islam.”

Mujahidh was arrested in June after taking a bus from LA to Seattle to participate in the attack. He and his co-defendant, Khalid Abdul-Latif of Seattle, were busted in an FBI sting when they arrived at a warehouse garage to pick up machine guns to use in the attack, authorities said.

The man who was to supply them with the weapons had alerted Seattle police about the plot, and continued acting as a confidential police informant.

Authorities say the defendants were influenced in part by the massacre at Fort Hood and the recent prosecutions of Washington state-based soldiers for the deaths of three Afghan civilians. They planned the attack for weeks and fantasized about the media attention they’d receive, according to a federal complaint.

The alleged target, the Military Entrance Processing Station in Seattle, was a recruiting station for all military branches. The pair initially planned an attack on Joint Base Lewis-McChord, but later shifted to what they considered an easier target, the complaint said.

Mujahidh confessed shortly after his arrest.

Abdul-Latif is also known as Joseph Anthony Davis, and Walli Mujahidh is also known as Frederick Domingue Jr.

Prosecutors did not divulge how the suspects became acquainted, though Mujahidh formerly lived in Seattle. Mujahidh had multiple convictions of theft in Riverside County, Calif.

Abdul-Latif, 33, has a criminal record and a troubled family past, but allegations that he plotted a terrorist attack surprised those who knew him. He appears to have posted several videos on YouTube expressing sympathy for al-Qaida’s leader in Yemen and excitement about a radical interpretation of Islam.

Abdul-Latif was scheduled to face trial next May. Mujahidh is due for sentencing in April.

(© Copyright 2011 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)