Pakistan on Thursday shut schools in several areas and suspended flights to and from Iran to try to stop the spread of new coronavirus, after reporting its first cases of the infection, officials said.

The South Asian nation bordering China and Iran, both of which have been hit hard by the virus, reported its first two cases on Wednesday.

Both people had recently travelled to Iran as part of large groups of pilgrims from Pakistan's Shi'ite Muslim community. Health officials have said both were "stable."

Authorities shut schools in the southern province of Sindh, including the country's largest city Karachi where the first case was reported, and the southwestern province of Baluchistan, which borders Iran. They also began to trace nearly 8,000 pilgrims who recently returned to the country from Iran.

Pakistan's Civil Aviation said it was suspending all flight operations with Iran starting from Thursday evening till further notice. "We have decided to close the flights with Iran," the aviation's spokesman Sattar Khokhar told Reuters.

Three Iranian carriers run seven flights a week to and from Pakistan.

Pakistan closed its border with Iran on Sunday following the outbreak in the neighbouring country. Twenty two people have died so far from the new coronavirus in Iran, the official news agency IRNA reported in a chart.

Sindh's Provincial Chief Minister Murad Ali Shah said the 28 pilgrims whom the first cases were part of had been traced and would be scanned and monitored.

"We're going to the next step," he told a news conference in Karachi, adding that the Sindh government was out to trace all the 1,500 people who had returned to his province from Iran in the month of February. There are a total 8,000 such pilgrims across the country, he said.

"We're locating each one of them," Shah said, adding they will go through 15 days of strict monitoring before being allowed to leave their homes. Shah said all these people and anyone who had got in touch with them had to be isolated.

The authorities, who have kept more than 200 of the pilgrims in quarantine at the border, have stepped up scanning measures at airports and other border crossing, including western Afghanistan, said government health adviser Zafar Mirza.

He called on the people to not panic. "We don't need to worry unnecessarily. We shouldn't create any kind of panic," he told a news conference Wednesday night. The health ministry has launched a media campaign to educate people, urging them to cooperate with authorities to help identify any suspected cases.

Pakistan, like most South Asian countries, is not well equipped to deal with any large scale emergency in case of the virus spread.