By Matt Siegel

SYDNEY (Reuters) - A Papua New Guinea court has granted an injunction barring university students from protesting on campus after dozens of people were wounded during clashes between student protesters and police in the capital, Port Moresby.

A groundswell of political unrest in recent weeks has surged in the country, just to Australia's north, amid calls for Prime Minister Peter O'Neill to resign over corruption allegations.

The government said initial reports that up to four people had been killed were incorrect. An official at the Port Moresby General Hospital said 38 casualties had been treated there, including four with bullet wounds, but no deaths.

Students and officials said police fired on the public and used tear gas to disperse crowds during a protest at the University of PNG's Waigani campus in Port Moresby. Protests were later reported in the PNG highland cities of Goroka and Mt. Hagen, and in Lae on the north coast.

Papua New Guinea Higher Education Minister Malakai Tabar welcomed the court order blocking students from resuming their rolling protests, blaming the violence on "thuggery" and the opportunists in the political opposition.

"The overwhelming majority of students simply want to go to class, sit their exams and proceed to the next semester," Tabar said, the Australian Broadcasting Corp. reported.

Thousands of students across PNG have been protesting and boycotting classes for weeks amid growing political unrest.

O'Neill, who came to power in 2011 promising to reign in corruption, denies allegations he authorized millions of dollars in fraudulent payments to a leading law firm.

Student protest leader Noel Anjo told Reuters on Thursday the protesters had no intention of giving up, noting that the injunction barred students from protesting but not other members of civil society.

"We're not going to give up. The students are not going to give up until and unless the prime minister resigns or surrenders himself to police and is arrested and charged," Anjo said by phone from Port Moresby. "This fight will continue."

Australian Foreign Minister Julie Bishop urged Australians travelling in Papua New Guinea to exercise caution, saying Canberra's influence only went so far in influencing the "very volatile" situation.

"We are calling for calm. The police response should at all times be proportionate," Bishop said in an interview with ABC radio. "Australia plays an important role in supporting PNG but at the end of the day, it's a sovereign nation."

(Editing by Lincoln Feast)