A police officer rappelled down a Manhattan skyscraper to stop a man who was facing financial fraud charges from jumping out of a 31st-floor window.

The daring arrest happened after federal agents went to the man's apartment near Carnegie Hall Wednesday morning to take him into custody.

Rather than give himself up, the man broke a window, sat on the ledge and threatened to jump, authorities said.

NYC CONMAN PERCHES ON BROKEN WINDOW OF SKYSCRAPER AS FBI RAIDS APARTMENT

"He was wanted by another agency, and instead of going peacefully to that agency he thought of taking his own life," NYPD Chief of Department Jeffrey Maddrey said at a news briefing.

Ian Mitchell in window

The NYPD detective who prevented Ian Mitchell (pictured) from jumping to his death has been identified as James Tobin. (Twitter/ @BaBaJewey/  Local X New York)

The man dangled one leg out the window as police officers tried to persuade him to surrender. After an eight-hour standoff, Detective James Tobin of the Emergency Service Unit rappelled down to the man's apartment from one floor up.

Videos of the episode show Tobin kicking the man back into the apartment while officers inside grab him.

NYPD SEES LARGEST STAFF EXODUS IN DECADES WITH LEADERS 'REFUSING TO ACKNOWLEDGE' MOUNTING CRISIS: UNION BOSS

The man was taken to a hospital for evaluation. It was not clear what charges he faced. Requests for information were sent to the FBI and the U.S. attorney's office on Thursday.

Maddrey said Tobin and the other officers from the elite ESU unit "showed patience, care, commitment" throughout the standoff. He said the officers "made a decision that nothing was going to happen to that man today and they kept their word."

CLICK HERE TO GET THE FOX NEWS APP

Police Commissioner Keechant Sewell called the operation "another example of your NYPD working alongside our partners, putting their lives on the line every day in furtherance of public safety and the city."