He was safer at Rikers.

A man was robbed at gunpoint in Greenwich Village early Saturday — just hours after he was released from the notorious jail complex due to coronavirus concerns, according to law enforcement sources.

The hapless victim, 36, was walking on West 4th Street near the intersection of Jones Street at around 2 a.m. when two men wearing face masks and hoodies drew a gun and robbed him of his wallet and cellphone, sources said.

No injuries were reported and the suspects remain at large, police said.

The victim is a defendant awaiting trial for an October assault case and told police he was among the incarcerated who was sprung from Rikers on Friday, sources said.

Corrections officials approved the release of a handful of people incarcerated at Rikers Island while awaiting court dates in an attempt to limit the spread of coronavirus in the facility.

At least four correction officers and one inmate at Rikers have tested positive for the coronavirus, with the head doctor at the complex warning earlier this week that a “storm is coming” in that the coronavirus would inevitably spread through the complex.

As New York has become the epicenter of the COVID-19 pandemic, citywide crime has taken a downturn as New Yorkers seek shelter indoors.