A US Army member turned his quiet Brooklyn block into a shooting range, firing his AR-15 into his own car and a neighbor’s home while accusing his wife of infidelity, authorities allege.

Harold Beard, a veteran of campaigns in both Iraq and Afghanistan, allegedly pointed his assault rifle out of the second-floor window of his Dyker Heights home at around 12:30 a.m. on Jan. 7, squeezing off at least 29 rounds, officials said.

“My wife is cheating on me,” Beard, 28, told responding cops, according to a criminal complaint. “I have an AR-15, I shot at my car, I shot it out of the window.”

No injuries were reported, but two rounds punched into Beard’s Cadillac as more sailed across 82nd Street and blew out a pair of windows at a neighbor’s home, authorities said.

“Thank God we were in the back because the bullets went straight through the window,” that neighbor, who declined to give his name, said Sunday.

“They could’ve killed my baby,” he added, noting that he has three kids, including a 4-year-old.

Another neighbor described the wild scene — and how Beard brought it to an end as quickly as he allegedly began it.

“I get up to take a piss and I see all the cop cars coming down . . . [police] running out of the car,” said that local, who also declined to give his name.

“He was very calm,” the neighbor added. “He took the gun apart, left it on the porch and called the cops on himself.”

That neighbor said that Beard came from a military family — with a history of service “since colonial times.”

Beard was hit with charges including reckless endangerment and criminal possession of a weapon. He was released at his arraignment into the custody of the Army, which placed him on restrictive duty, according to the Legal Aid Society, which is representing Beard.

People seen coming and going Sunday from Beard’s home — where a second-floor window was still covered with cardboard — declined to comment, and a publicly listed phone number for him was out of service.

It was unclear whether the gun was military-issued, and the US Army did not respond to a request for comment.