If at first, you don’t succeed …

An accused cop basher whose dramatic escape attempt Thursday from Rikers Island was foiled gave it another shot on Sunday — spending his roughly 30 minutes of freedom in a standoff atop a jailhouse roof.

During recreation time, Arthur Brown scrambled up a fence outside the complex’s North Infirmary Command building at around 9 a.m., according to Department of Correction officials and sources.

NYC'S MUSEUM OF NATURAL HISTORY TO REMOVE TEDDY ROOSEVELT STATUE, OFFICIALS SAY

The gymnastic jailbird, 37, eventually made his way onto a roof.

At one point, he sat shirtless, feet dangling over the roof’s edge, in a stare-down with prison officers at ground-level.

Before he could get any further, Brown was nabbed, fastened onto a Stokes basket-style stretcher, and lowered down by at least six correction officers, ending his half-hour stunt.

“This detainee was quickly apprehended and returned to custody,” said DOC spokesman Peter Thorne. “The incident is under investigation and there will be immediate staff suspensions if warranted.”

Brown’s aborted flight to freedom on Sunday came as DOC officials were investigating another bid he made on Thursday.

In that jailbreak, Brown clambered up a fence cordoning off a rooftop recreation area on the island’s George R. Vierno Center — then made a break for the East River — while he and his fellow inmates were getting some air, sources said Thursday.

"Aerial view of Rikers Island, New York's City main jail complex." (iStock)

MIRANDA DEVINE BLAMES DE BLASIO, BAIL-REFORM LAWS FOR TROUBLING RISE IN NYC MURDERS: IT'S A 'FREE FOR ALL'

A surveillance camera captured Brown scaling the fence at 12:17 p.m., but his escape wasn’t reported until 12:41 p.m. It was unclear how he made it down from the two-story roof, sources said.

A “red alert” was issued, and by 1:30 p.m. Brown was pulled from the water near the island.

The DOC did not immediately respond to an inquiry about why Brown was again allowed outdoor recreation after his first escape attempt — and whether it would now be revoked.

Brown, a Brooklyn resident, has been jailed since May 7, 2019, when he was allegedly caught trespassing at the Staten Island Ferry Terminal in lower Manhattan, and then allegedly assaulted two NYPD cops.

Brown allegedly hurled human waste at a correction officer inside Manhattan Criminal Court two days after that bust, according to court papers.

CLICK HERE TO GET THE FOX NEWS APP

He was also charged with punching and trying to choke a court officer, according to sources.