Police arrested the man they say raped and robbed a woman as she worked in her New York City office building.

The woman was attacked and robbed Friday evening at an office building on Forrest Avenue in the Mariners Harbor section of Staten Island.

The man suspected of raping her, 28-year-old Maurice Scott, was being held at the 121th precinct Tuesday morning. Police said they received a tip that led to his arrest.

Police say they think Scott entered the office building around 5:30 p.m. and raped the 44-year-old victim as she was wrapping up her workday. Authorities say the man who raped her claimed to have a gun and threatened to shoot her if she didn't obey his commands.

Scott then allegedly stole the woman’s jewelry, cellphone and cash before taking off.

Marc Garafano, a worker at the building, said that Scott had claimed to be applying for a job to get inside the offices, but the NYPD couldn't confirm that detail to NBC 4 New York.

The victim was treated at Richmond University Medical Center. Police said she doesn’t know her attacker.

People working nearby said they've seen the man in the area, begging for money and picking up cigarettes off the ground.

Scott has nine prior arrests, most of them for assault, according to police.

Scott was arrested in June 2015 for the assault and stalking of a male victim. He was arrested in 2013 for criminal possession of stolen property and in 2003 for robbery with a weapon. It's not clear if he'd been convicted of those charges.