Gov. Paterson signed legislation into law yesterday extending mayoral control of New York City’s 1.1 million-student school system — the nation’s largest — through June 30, 2015.

Paterson quietly signed the mayoral-control bill into law in his Manhattan office yesterday morning after months of stormy public debate.

The governor said he took “great pleasure” restoring stability to the school system — and allowing families “to breath a sigh of relief” — after Senate inaction allowed the mayoral-control law to lapse for 36 days.

“The agreement continues the progress made under Mayor Bloomberg over the last several years . . . Since 2002, students have been performing at higher levels across the board,” Paterson said in a statement.