Another passenger says a flight attendant had instructed the pet's owner to store the carrier that held the dog in the overhead compartment.

United has apologized.

United Airlines has apologized after a passenger's dog died Monday evening during a flight from Houston to New York's LaGuardia Airport.

Maggie Gremminger, who says she was a passenger on the flight, said the dog was traveling with a woman and her two children and was being kept in a TSA-approved dog carrier.

But Gremminger said in a photo on Facebook that a flight attendant forced the dog's owner to put the carrier and its occupant in the overhead compartment.

"Tonight I was on a plane where I witnessed a @united flight attendant instruct a passenger to place her dog carrier (with dog) in the overhead compartment," Gremminger said. "The passenger adamantly refused but the flight attendant went on with the instruction.

"At the end of the flight the dog was found dead in the carrier. I am heart broken right now. I didn't question the flight attendant but I could have. I assumed there must be ventilation as surely the flight attendant wouldn't have instructed this otherwise I heard the dog barking a little and we didn't realize it was barking a cry for help."

Gremminger told the travel blog One Mile at a Time: "By the end of the flight, the dog was dead. The woman was crying in the airplane aisle on the floor."

In a statement to Business Insider, United Airlines apologized:

"This was a tragic accident that should never have occurred, as pets should never be placed in the overhead bin. We assume full responsibility for this tragedy and express our deepest condolences to the family and are committed to supporting them. We are thoroughly investigating what occurred to prevent this from ever happening again."

The airline declined to comment on its in-cabin pet stowage policy and whether the passengers were compensated for their loss.