Two hikers whose bodies were discovered last week in a steep canyon in a national park in Southern California died of gunshot wounds, the authorities said in a statement on Friday, in what appeared to be a murder-suicide.

The bodies of the hikers, Rachel Nguyen, 20, and Joseph Orbeso, 22, who had been missing since late July, were found embracing each other under a tree in Joshua Tree National Park, according to the San Bernardino County Sheriff’s Department. Their lower extremities were covered by clothing. They had no water and seemed to have been rationing their food.

A gun found near the pair was registered to Mr. Orbeso. Detectives believe that Mr. Orbeso shot Ms. Nguyen, then immediately shot himself. The county coroner’s office called the deaths a murder-suicide.

“Usually there’s history — a note or message to someone,” Cindy Bachman, a spokeswoman for the sheriff’s office, said in a phone interview. In the absence of that, she added, it is difficult to determine a motive.