St. Mary’s College of Maryland plans to freeze in-state tuition for the next two years, thanks to a burst of new state funding that lawmakers backed unanimously. The “public honors college” was left out of previous statewide tuition freezes, and it has quickly become one of the nation’s most expensive public colleges.

“Tuition really had gotten out of whack,” St. Mary’s President Joseph R. Urgo said. “Everyone in Annapolis is so committed to changing this.”

Maryland lawmakers recently voted unanimously to give St. Mary’s an extra $800,000 for the 2013-2014 academic year and more than $1.6 million for the following year, replacing money the school would have collected from higher tuition.

That means undergraduates who are Maryland residents will not see their tuition increase in the fall. Out-of-state tuition will increase 4 percent, and all students will see a slight increase in the cost of room and board.

Across the country, state funding for higher education has steadily eroded, prompting several years of painful tuition increases. Maryland Gov. Martin O’Malley (D) pushed lawmakers in 2007 to increase the corporate income tax and give the extra funds to the state’s public colleges and universities, allowing them to freeze in-state tuition for four years.

The freeze ended in 2010, and recent tuition increases have been about 3 percent.

St. Mary’s was left out of the freeze, as it is not part of the University System of Maryland. The small college in rural Southern Maryland has its own governing board and receives a predictable block of state funding each year.

St. Mary’s is considered an affordable alternative to pricey private schools, but it has long been the state’s most-expensive public school.

St. Mary’s in-state tuition and fees grew from about $10,900 during the 2005-06 year to about $14,775 this school year. In comparison, Maryland’s flagship campus in College Park charged residents about $7,800 in 2005-06 and $8,900 this year.

Before the freeze, Maryland was ranked eighth in the nation for having the highest average tuition and fees at its four-year public schools, according to the College Board’s annual “Trends in College Pricing” report. This school year, Maryland’s rank improved to No. 27 — considerably ahead of Virginia, the 13th most expensive for in-state tuition, and Pennsylvania, the fourth most expensive.

“We have done an excellent job with all of our other schools, but St. Mary’s was starting to stick out,” said Del. John L. Bohanan Jr. (D-St. Mary’s), who proposed legislation for the freeze in February. “That doesn’t help the state’s overall standing.”

St. Mary’s trustees voted early last month to increase tuition 4 percent for the coming school year. In the weeks following, the Maryland House of Delegates and Senate unanimously approved the legislation, and St. Mary’s announced that O’Malley will speak at commencement. On Thursday, the trustees voted to freeze in-state tuition for this coming school year.

In addition to money to offset the tuition freeze, St. Mary’s will receive funding for a program that helps at-risk students stay in school and graduate. Overall, the legislation permanently adds $2.4 million to the block of funding St. Mary’s receives from the state each year.