(CNN) -- Former Weather Underground militant Bill Ayers will appear at the University of Wyoming on Wednesday after a federal judge ruled he can't be barred from speaking on campus.
U.S. District Judge William Downes ordered Tuesday that the university must take "all prudent steps" to guarantee Ayers' security at his lecture.
The university had argued that "serious threats" prompted it to cancel the appearance by Ayers, who is now a University of Illinois education professor.
Downes' two-page order requires university officials to take "all prudent steps to maintain order and provide for the security of participants and spectators." University officials won't appeal the order, said spokeswoman Jessica Lowell.
University President Tom Buchanan said the school "will do everything in our power to provide a safe and secure environment for his visit."
Ayers became a footnote to the 2008 presidential campaign because of his history of violent opposition to the Vietnam War and his acquaintance with then-candidate Barack Obama.
Some prominent Republicans suggested that Ayers was a shadowy influence on Obama during his 2008 presidential bid. GOP presidential candidate John McCain urged Obama to "come clean" about his relationship with Ayers and vice presidential nominee Sarah Palin accused Obama of "palling around with terrorists."
Ayers and Obama served on the Annenberg Challenge board and on the board of another Chicago, Illinois, charitable foundation, the Woods Fund, in the 1990s. A CNN review of the two men's history found nothing inappropriate in their dealings, and Ayers later called the attacks "a profoundly dishonest narrative."
David Lane, a lawyer for Ayers and University of Wyoming student Meghan Lanker, called Tuesday's ruling "inspirational" and "a huge victory for the First Amendment."
Ayers was scheduled to speak on education issues at the university in early April, but the longstanding invitation drew controversy as the date neared. Republican candidates for governor condemned the school for inviting him, and in court papers Lanker stated she was told Ayers' appearance "would inflame public sentiments" and hurt the university.
But university officials said they pulled the plug because they had "serious threats and other information concerning potential violence" and argued that Ayers could speak freely somewhere else.
"The UW administration did not bar Ayers from campus, but denied permission to rent space for a large event on university property because of serious security concerns," Buchanan said on the school's website.
Ayers was a leader of the Weather Underground, a radical anti-war group that claimed responsibility for bomb attacks on the U.S. Capitol, the Pentagon and about 20 other targets. No one died in those attacks, though three Weather Underground members blew themselves up building another bomb in 1970.
Ayers and his wife, fellow Weather Underground member Bernadine Dohrn, spent a decade on the run before surrendering to authorities in 1980. The charges against him were dropped due to illegal wiretaps and prosecutorial misconduct.