A homeless man was charged with murder on Tuesday after being accused of killing two unemployment-office workers and seriously injuring a third on Monday in Ashburton, a South Island town in New Zealand.

Russell John Tully, 48, was arrested on Monday evening following a massive manhunt in the town that reportedly lasted for seven hours. He was produced in Christchurch District Court on two charges of murder and one count of attempted murder Tuesday morning. Tully did not enter a plea in court and was remanded into police custody until his next hearing on Sept. 23, Fox News Australia reported.

Paula Bennett, New Zealand’s Social Development Minister, reportedly told TVNZ that Tully, a former mine worker, was getting help from Work and Income New Zealand, or WINZ, and was offered further assistance, which he reportedly rejected, according to Fox News Australia. 

“At Work and Income he had been getting everything he had been entitled to,” Bennett reportedly said, adding: “He had been offered a lot of assistance in a lot of different ways that he had turned down. He had been offered accommodation and things but he was pretty fixated on one particular house that was never going to go to him because it was marked for a family.”

Lisa-Marie Brooks, a police spokeswoman said that a special police dog unit finally caught Tully near a lake around 5 p.m. in Ashburton, about 55 miles south of Christchurch, the largest city on South Island, the Windsor Star reported, adding that police were still looking for the weapon he used to kill the office workers.

According to police officials, the shootings began about 10 a.m. Monday when a man, who one witness said wore a black balaclava, entered a WINZ office and shot at two women, according to the Ashburton Guardian. Another witness told the newspaper that the man was carrying a sawed off shotgun and fled on a bicycle. All three victims worked for WINZ, according to Brendan Boyle, head of the Ministry of Social Development. The third victim is reportedly being treated at an area hospital.

“The names of the three victims will only be released once all family members have been fully informed,” said Detective Inspector Tom Fitzgerald, according to Fox News Australia.

A few weeks earlier, in an interview with the Ashburton Guardian, Tully had reportedly complained of his struggles to find a place to live after returning from Australia to his home town where he said he had “come home to die” from a skin disease, adding that he ended up living in a tent after being unable to secure government-assisted accommodation. Tully also said that he had written to lawmakers about his predicament.

Winston Peters, a local lawmaker, reportedly said in a statement that Tully had emailed his political party on Aug. 15 about his difficulty in finding a house. “We replied immediately and also followed up,” Peters reportedly said. “However, the emails kept bouncing back.”