MADISON, Wis. — Tuition will be frozen for all students attending the University of Wisconsin System over the next two years, while fees and room and board costs will go up, under action taken Thursday by the Board of Regents.

The state budget passed by the Legislature last month, and signed by Gov. Scott Walker, required a tuition freeze for Wisconsin residents attending any UW school. But the regents broadened that freeze to include graduate and out-of-state students.

"This freeze will make higher education more accessible and affordable for all current, and prospective, students," said David Gardner, chair of Associated Students of Madison, the official student government.

While regents approved the freeze, they also gave the green light to increasing segregated fees an average of $36, or half a percentage point. Room and board fees will go up an average of $193, or 3 percent, across the UW system.

The average cost for an undergraduate at UW-Madison starting in the fall of 2013 will be $9,273 in tuition, $1,130 in fees and $8,287 for room and board.

A plan to increase tuition in four graduate programs was dropped, pending further study.

UW President Kevin Reilly originally proposed a 2 percent tuition hike in each of the next two years, but the Legislature mandated no increase after news broke that UW had a $650 million budget surplus that included about $414 million from tuition.

That surplus was generated during a time when the university raised tuition 5.5 percent the six previous years and had its budget cut by $250 million over the previous two years.

That surplus is expected to grow to about $785 million at the end of the month, but about $323 million will be taken from it to pay for the tuition freeze and other expenses. Of the $785 million surplus, about $534 million will be from tuition, David Miller, UW's chief financial officer, told regents at their meeting.

In addition to mandating the tuition freeze, the state budget also allows for a 1 percent pay raise in each of the next two years for UW employees. That is the same raise given to state employees.