“I was in my pajamas, it was 10:55 . . . I see this feed coming in and I see a man who is dressed like a painter come in,” Miller told the Post on Wednesday outside the ravaged medical office.

He watched as the suspect, whom police identified as Michael Walker, 49, allegedly donned a suit and gloves and ransacked the office. He allegedly grabbed a bottle out of the restroom and doused a room with the liquid, which police ­believe was an accelerant.

Watching live from his bedroom, Miller told police exactly where the suspect was inside, helping lead to the arrest.

“I saw the guy going back to the rear exit and I said to the dispatcher, ‘He’s going back to the exit on Marlborough [Road]!’ ” Miller said.

Medical facility executive director Yehuda Miller was alerted by an alarm and watched a live webcam feed on his cellphone from his New Jersey home as the alleged thief and arsonist went through the building in Brooklyn.Paul Martinka

“They were standing right there and met him at the door.”

Six firefighters suffered minor injuries putting out the blaze, which continued to rekindle through the night. Walker was charged with burglary, three counts of arson, two counts of reckless endangerment, three counts of criminal mischief, one count of criminal trespassing and one count of trespassing, cops said.

Michael WalkerPaul Martinka

Miller believes someone had been hired to set the building on fire and said it was being targeted possibly because of the women’s health services offered.

“The first thing police asked us is do we do abortions. We say no, we don’t do abortions! We don’t really know who is hiring these arsonists,” Miller said.

In May 2015, an alleged arsonist set fire to the medical practice twice in one week.

Law enforcement officials say it wasn’t yet known if Walker was responsible for the earlier fires.