SYDNEY, Australia — The police opened fire on student protesters in Papua New Guinea’s capital, Port Moresby, on Wednesday, a member of the country’s Parliament said. Officials said that more than 20 people were wounded but that no one was killed.

About 2,000 students from the University of Papua New Guinea had gathered to make their way to Parliament to demand that Prime Minister Peter O’Neill resign, said the lawmaker, Gary Juffa. Mr. O’Neill has been embroiled in a long-running corruption scandal, and for weeks thousands of university students have boycotted classes and demanded his resignation.

“Paramilitary police and squad police told the students they needed to turn back because they did not have permission to hold the protest,” said Mr. Juffa, a critic of the prime minister. “Then they started firing.”

A spokesman for the country’s police force, Dominic Kakas, said that 23 people had been hospitalized, at least five of them in critical condition.