Shanghai authorities reportedly warned Wednesday that anyone who violates COVID-19 lockdown rules will face punishment. 

The police department called on the city's 25 million residents to "fight the epidemic with one heart."

SHANGHAI RESIDENTS RECORDED SCREAMING FROM APARTMENTS AFTER SEVEN DAYS OF LOCKDOWN

"Those who violate the provisions of this notice will be dealt with in strict accordance with the law by public security organs ... If it constitutes a crime, they will be investigated according to law," the department said in a statement, according to Reuters. 

Shanghai is experiencing China's largest COVID-19 outbreak since the pandemic started in Wuhan. 

However, some residents were allowed out of their homes Tuesday as the city eased its two-week-long shutdown. 

The online news outlet The Paper cited city officials, saying that about 6.6 million people can go outdoors, but others must stay in their own neighborhoods. 

In addition, some markets and pharmacies would reopen – even as a health official warned China does not yet have the virus under control. 

Millions have been confined to their homes and struggling to get daily supplies – including food and medicine – after the abrupt closure of most businesses on March 28. 

STATE DEPARTMENT ORDERS STAFF TO LEAVE SHANGHAI, WARNS OF 'ARBITRARY ENFORCEMENT' OF COVID-19 RESTRICTIONS

Videos shared widely on social media showed city-dwellers shouting from their balconies in protest, with some saying they had not received government distributed packages. 

Online grocers sold out early in the day during the beginning of the shutdown and customers experienced delays as vendors struggled to meet the demand.

Those who test positive for COVID-19 are forced into temporary quarantine facilities that have been criticized by some as crowded and unsanitary.

Some Chinese officials have been fired for failing to act aggressively enough ahead of the outbreak. 

The country's government reported 24,659 new cases through midnight Monday, including 23,387 with no symptoms. That tally included 23,346 in Shanghai, where no deaths have been reported in the latest wave.

On Monday, the U.S. announced that all "non-emergency U.S. government employees" would be withdrawn from its Shanghai Consulate, leading a foreign ministry spokesman to accuse Washington of politicizing its evacuation.

CLICK HERE TO GET THE FOX NEWS APP

The State Department advised Americans against travel to China last week due to "arbitrary enforcement" of laws and anti-virus restrictions, including a risk of "parents and children being separated."

The Associated Press contributed to this report.