A dog died on a United Airlines plane after a flight attendant ordered its owner to put the animal in the plane's overhead bin.

United said Tuesday that it took full responsibility for the incident on the Monday night flight from Houston to New York.

In a statement, United called it "a tragic accident that should never have occurred, as pets should never be placed in the overhead bin."

The dog was in a small pet carrier designed to fit under an airline seat.

Passengers reported that they heard barking during the flight and didn't know that the dog had died until the plane landed at LaGuardia Airport.

Passenger Maggie Gremminger posted a photo on Twitter of the dog's owner and children after the flight. "I want to help this woman and her daughter. They lost their dog because of an @united flight attendant. My heart is broken," she wrote.

I want to help this woman and her daughter. They lost their dog because of an <a href="https://twitter.com/united?ref_src=twsrc%5Etfw">@united</a> flight attendant. My heart is broken. <a href="https://t.co/mjXYAhxsAq">pic.twitter.com/mjXYAhxsAq</a> —@MaggieGrem

United spokesperson Charles Hobart said the flight attendant told the dog's owner to put the pet carrier in the overhead bin because the bag was partly obstructing the aisle. It is unclear why the carrier was not placed under a seat, he said.

Hobart said United is investigating the incident and talking to the flight attendant, whom he declined to identify. He said the airline refunded the tickets purchased for the dog owner and her two children and the fee that they paid to bring a pet on board.