WASHINGTON (AP) — The gunman in the mass shootings at the Washington Navy Yard, Aaron Alexis, had a history of violent outbursts, was at least twice accused of firing guns in anger and was in the early stages of treatment for serious mental problems, according to court records and U.S. law enforcement officials.

But Alexis apparently managed to exploit seams in the nation's patchwork of complicated gun laws designed to keep weapons out of the hands of dangerous people. He was able to buy a shotgun in Virginia with out-of-state identification, even though that would have prevented him from buying a handgun.

It is illegal for gun dealers to sell handguns to such out-of-state buyers, but the Firearms Owners' Protection Act, passed by Congress in 1986, opened up interstate sales for shotguns and rifles. Virginia gun laws require only that an out-of-state buyer show valid identification, pass a background check and otherwise abide by state laws in order to buy a shotgun in the state. Alexis was never prosecuted for the two misdemeanors involving guns.

Alexis bought the shotgun at Sharpshooters Small Arms Range in Lorton, Va. on Saturday, according to a statement from the attorney for the gun range.

Michael Slocum said in an email that Alexis rented a rifle, bought bullets and used the range before buying the shotgun and 24 shells. Slocum said Alexis passed a federal background check.

Law enforcement officials visited the range Monday, reviewing the store's video and other records.

"What the 1986 Firearms Owners' Protection Act did was it made it more convenient for gun buyers," said Kristen Rand, the legislative director at the Violence Policy Center. "That's the road we've been on for a while: The convenience of gun owner always seems to trump the right of victims not to be shot."

Federal gun laws bar the mentally ill from legally buying guns from licensed dealers. But the law requires that someone be involuntarily committed to a mental health facility or declared mentally ill by a judge, and that information must be reported to the FBI in order to appear on a background checks. In the wake of the 2007 shooting at Virginia Tech, state authorities changed state laws to make it tougher for the mentally ill to buy guns there.

Story continues

But like other recently accused mass shooters, Alexis was never declared mentally ill by a judge or committed to a hospital. He was being treated by the Veterans Administration as recently as August, according to two law enforcement officials, but the Navy had not declared him mentally unfit.

The Virginia Tech shooter, Seung Hi Cho, was declared mentally ill by a judge, but nobody ever reported it to federal authorities to get him included in the database of banned purchasers.

After the December massacre at a Connecticut elementary school, U.S. lawmakers pushed to overhaul gun laws. Among the proposals was a ban on military-style rifles, including the popular AR-15, and high-capacity ammunition magazines. There was also a plan to expand background checks to make sure anyone who wanted a gun got the approval of the federal government.

No legislation has moved forward in Congress, despite urgent pleas from the president, some lawmakers and victims' families.

President Barack Obama has made a few narrow administrative changes, but those are not likely to impact the kinds of guns most often found at crime scenes.

Obama said Tuesday he was concerned that an American ritual could emerge where every few months, the nation suffers a horrific mass shooting, then fails to take action to stop the next one from occurring. He said he would continue speaking out about the need for new gun laws, but that ultimately, it's up to lawmakers.

"I've taken steps that are within my control," Obama said in an interview with Telemundo. "The next phase now is for Congress to go ahead and move."

Monday's shooting prompted a new round of calls for action from lawmakers.

Senate Majority Leader Harry Reid, D-Nev., and Sen. Joe Manchin, D.-W.Va., the author of a bill on background checks, both said they would like to see a vote on the background checks bill, but the votes aren't there for passage at this time.

Still, Reid said he hopes to get another gun control vote this year. "I don't want any more bad things to happen, you know. Something's going to have to get the attention of these characters who don't want any controls."

Sen. Dianne Feinstein, D-Calif., a leading advocate for tougher gun control in the Senate, said in a statement that the shooting "is one more event to add to the litany of massacres."

"Congress must stop shirking its responsibility and resume a thoughtful debate on gun violence in this country. We must do more to stop this endless loss of life," she said.

Some congressional Democrats and family members of shooting victims planned to gather at the Capitol on Wednesday to renew their push for background check legislation. The trip, organized by the Newtown Action Alliance, was previously planned to mark the nine-month anniversary of the Connecticut school shooting.

For Obama, it was at least the seventh mass shooting of his presidency, and he mourned the victims while speaking at the White House on Monday.

"We are confronting yet another mass shooting, and today it happened on a military installation in our nation's capital," Obama said. "It's a shooting that targeted our military and civilian personnel. These are men and women who were going to work, doing their job protecting all of us. They're patriots, and they know the dangers of serving abroad, but today they faced the unimaginable violence that they wouldn't have expected here at home."

__

Associated Press writer Nedra Pickler contributed to this report.

___

Follow Alicia A. Caldwell on Twitter at www.twitter.com/acaldwellap