A Montgomery County man has been charged with third-degree murder, after investigators say he slammed his 6-week-old son on a bed while frustrated that the infant was being fussy.

David Moyer, 24, of Trappe, is also charged with endangering the welfare of a child and reckless endangerment in the death of his son, whom investigators did not name. He remained in custody Wednesday in lieu of $1 million bail. There was no indication he had hired an attorney.

Moyer and his wife took their son to Phoenixville Hospital on Feb. 20, telling staff there that the child was unresponsive and lethargic. The boy’s injuries were so severe — including a hemorrhage in his brain and broken ribs — he was airlifted to Children’s Hospital of Philadelphia. He died there days later, according to an affidavit of probable cause for Moyer’s arrest.

An autopsy revealed that the boy had suffered blunt-force trauma to his head and that the manner of his death was homicide.

Initially, Moyer said he had been caring for the boy while his wife was downstairs, and had left him alone briefly to prepare a bottle for the baby, according to the affidavit. When Moyer returned, he said, the infant had rolled onto his side and was unresponsive when Moyer picked him up.

During a second interview with detectives, after his son’s autopsy, Moyer admitted to lying. He said that on the day he took his son to the hospital, he had become angry at the child, having had very little sleep the previous two nights, the affidavit said. The infant became fussy and at one point vomited on Moyer as he was caring for him, the father said.

In a moment of frustration, Moyer said, he slammed the baby facedown onto a mattress and left him there. When he came back to the room 20 minutes later, he said, the baby wasn’t breathing.

Moyer told detectives he didn’t realize the extent of his actions until much later because “it all happened too fast and too quick,” the affidavit said.