Police have arrested a man they say is responsible for starting an early morning fire that devastated three homes in Midwood, Brooklyn.

Pittsburgh, Pennsylvania resident Matthew Karelefsky was charged with two counts of attempted murder and arson for the June 13th blaze, which started at 1488 East 17th Street (between Avenues N and O) and then spread to neighboring houses.

Karelefsky apparently has a grudge against Rabbi Jonathan Max, who lived in the home.

In a text conversation, Karelefsky told the Post last week, "I do hate him. Doesn’t mean I torched his house. Of course the ­police will think it is me." Karelefsky's LinkedIn bio makes accusations again Max, while he also apparently has a tattoo saying, "Kill Rabbi Max."

Max's son told WCBS 2 that his father has a restraining order against Max. Ezra Max also said that Karelefsky "said he would destroy him reputationally and then he came to actually kill him physically."

The Post found that a person named Matthew Karelefsky accused, in social media posts, the rabbi of molesting him and causing the dissolution of his marriage. Rabbi Max called the allegations "nonsense... I have the man’s own explanation — it’s as crazy you would imagine.... Fundamentally he feels that I cheated him — that he thought so highly of me and I turned on [him]. Somehow, he understood that I was a key figure — of which he was terribly mistaken. I was the one who told him not to divorce."

The rabbi, who also said that he only met Karelefsky when he was an adult with children, explained to the NY Times, "When you take the word ‘rabbi’ and put it next to abuse, people think it’s a natural association."

Vosizneias reports, "Karelefsky was a former student at Yeshiva Rabbi Chaim Berlin where Rabbi Max has taught for many years and also served as a former dorm counselor."

Karelefsky texted his landlord in Pittsburgh to say, "I am on the run from the police BIG TIME" on Saturday, according to the NY Times.

Last fall, Mr. Karelefsky moved into a house in suburban Pittsburgh owned by [Marlon] Haywood, who said that Mr. Karelefsky was troubled but that he was surprised to hear of the arrest.

A few weeks ago, he said, Mr. Karelefsky told him the local police had questioned him after someone reported that a man was threatening a rabbi at a gas station.

Mr. Haywood said that for several months, Mr. Karelefsky told him he had been traveling back and forth to New York, where he said he had been accused of threatening a rabbi. Mr. Haywood said he did not know the details of the case, but that Mr. Karelefsky had told him he had been cleared of the charges.

“I thought that was all water under the bridge,” Mr. Haywood said.

Fourteen people—including at least three firefighters and a baby—suffered minor injuries from the fire, which required 170 firefighters to battle. This video shows the moment when the fire flared up:

Prosecutors revealed that there were receipts of Karelefsky buying "charcoals and matches... [Karelefsky] also made admissions to setting the fire using gasoline and charcoal…This is after the defendant was tracked and found in Manhattan with a bag full of lighter fluid an axe and knives."

Karelefsky was held without bail. His next court date is Friday, June 21st.