Lawmakers at the state and county levels in Maryland are trying to legislate their way out the foreclosure crisis that has gripped the state for years.

In Prince George's County, which has made up about one-third of all Maryland foreclosures, two new bills introduced in the state Senate would aid residents at risk of losing their homes.

State Sen. Anthony Muse, D-Prince George's, introduced a measure Tuesday that would strengthen a state law requiring banks and homeowners to attend mandatory mediation sessions to try to avoid foreclosures.

The bill also would create a tax credit for people buying houses in areas across the state designated as foreclosure hot spots.

And state Sen. Douglas J.J. Peters, D-Prince George's, and Del. Craig Zucker, D-Montgomery, co-sponsored legislation that would extend the benefits of a federal law passed in 2007, which prevents banks from taxing home-sale profits when the house sells for less than its assessed value.

A flurry of new bills have been introduced in the Virginia General Assembly as well, as officials try to find ways to avoid foreclosures and assist residents who lost their homes during the recession.

In Prince George's County, the council is considering a resolution to create a foreclosure task force that could recommend new ways for the county to deal with its foreclosure problem.

"I want to get folks who are in the county to roll up their sleeves and help us with foreclosures," said Councilman Obie Patterson, D-Fort Washington.

The joint state-federal settlement bringing nearly $1 billion to Maryland is a big help, but "there's enough for any numbers of groups to do," he said.

Prince George's County accounted for 25 percent of the state's foreclosures from January to September 2011 with 22,401 foreclosure notices.