Updated

Missouri lawmakers voted overwhelmingly Friday to repeal part of a contentious new law that prohibited teachers from chatting privately with students over Internet sites such as Facebook.

Gov. Jay Nixon must now sign the repeal for it to take effect. He previously has called upon lawmakers to repeal the online communications law in a special legislative session. His request came shortly after a judge barred the Missouri law from taking effect Aug. 28 because it could "have a chilling effect" on free-speech rights.

"When we make errors we need to fix them, and that's what we're doing here today," said Rep. Chris Kelly, a Democrat from Columbia.

Lawmakers removed the original law's most publicly controversial provision, which barred teachers from using websites that allow "exclusive access" with current students or former students who are 18 or younger, such as occurs with private messages on Facebook.

But the repeal went a step further by also requiring public school districts to adopt policies by March 1 on employee-student communications, including "the use of electronic media," in order "to prevent improper communications." The House passed the legislation to repeal the law by 139-2 vote. The Senate passed it 33-0 earlier this month.

The Missouri Constitution gives the governor the authority to determine which matters lawmakers can consider during extraordinary sessions. But lawmakers contend that does not mean the governor can limit how legislators act on those matters -- for example, by restricting them only to repealing a section of law instead of amending it.