Two American women lost at sea for five long months have been rescued after a broken mast and a disabled engine took them thousands of miles off course.

Jennifer Appel, 48, and friend Tasha Fuiava were found by a Taiwanese fishing vessel around 900 miles southeast of Japan, the U.S. Navy said Thursday. A Navy ship based out of Sasebo, Japan, rescued them on Wednesday morning Japan time.

"When I saw the gray boat on the edge of the horizon, my heart leapt because I knew that we were about to be saved," Appel told TODAY. "I honestly believed that we were about to die within the next 24 hours."

On May 23, the women set off from Oahu bound for Tahiti, about 2,600 miles away, but problems soon arose. First, a piece of the mast called a spreader failed, Appel said, limiting the sailboat's maneuverability, and on May 30 a storm flooded the engine. Communications were also impacted.

Appel and Fuiava described a sense of despair after making daily distress calls for 98 days straight, but the calls were out of range. They spotted other ships that did not or could not respond, and fired at least 10 flares. Twice the ship was attacked by Tiger sharks, they said.

"I could see light and I could see vessels, and once you get closer, we thought it would be close enough to do a [distress] call," Fuiava told TODAY. "When they would turn and keep going, yeah, it was kind of sad."

The women were rescued along with their two dogs, Zeus and Valentine, who had been aboard with them. While the dogs provided an immense source of comfort during the ordeal, at times Appel and Fuiava feared they would tip off sharks circling around their boat.

"I went downstairs with the boys and we basically laid huddled on the floor and I told them not to bark because the sharks could hear us breathing. They could smell us," Appel said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In this Wednesday, Oct. 25, 2017 photo, sailors from the USS Ashland approach a sailboat with two Honolulu women and their dogs aboard as they are rescued after being lost at sea for several months while trying to sail from Hawaii to Tahiti. Jonathan Clay / U.S. Navy via AP

On the 99th day of distress calls, a Taiwanese fishing vessel found them, they said. It began towing the sailboat, but by that time Appel said the ship was in such poor condition she estimates it wouldn’t have lasted another a day.

The Taiwanese ship's crew contacted the Coast Guard in Guam, and the USS Ashland, an amphibious dock landing ship, sped toward the area and reached the sailboat at around 10:30 a.m. Wednesday Japan local time (9:30 p.m. Tuesday ET), the Navy said.

Video released by the Navy showed Appel blowing kisses to an approaching U.S. vessel as the two dogs barked and scampered about.

The journey from Hawaii to Tahiti is a fairly common route that normally takes about a month to complete.

Before departing, the mariners had loaded their boat full of supplies. They had water purifiers and a year's worth of food aboard — mostly dry goods like oatmeal, pasta and rice — and used those to survive, the Navy said.

Sailing experts in Honolulu had advised that for the trip to Tahiti they should pack the boat with as much food as possible in case of emergency, Appel said.

In this Wednesday, Oct. 25, 2017 photo, USS Ashland sailors help Zeus, one of two dogs who were accompanying two Honolulu women who were rescued after being lost at sea for several months while trying to sail from Hawaii to Tahiti. Jonathan Clay / U.S. Navy via AP

Appel and Fuiava were taken aboard the USS Ashland and will remain until the ship’s next port of call, the Navy said. The Navy did not disclose their exact location for security reasons.

📺🔊: #USSAshland rescues two mariners and their dogs stranded in Pacific Ocean for months - https://t.co/u4ntPRLtHL via @Amphib7FLT pic.twitter.com/t7e50EwTjt — U.S. Navy (@USNavy) October 26, 2017

When they were found, they were far off course — closer to Japan and more than 5,000 miles away from Tahiti.

"It was incredibly emotional, and it was so satisfying to know the men and women that serve our country would come and assist us — it was actually quite mind blowing and incredibly humbling," Appel said in a conference call from aboard the USS Ashland after their rescue.

"It was very depressing and it was very hopeless, but it's the only thing you can do, so you do what you can with what you have,” she added. "You have no other choice."

Jennifer Appel's mother, Marie Appel, said in a phone interview Thursday that she doesn't know when she will be reunited with her daughter, who is from Texas and has been living in Hawaii for about eight years.

"Jennifer's a very strong-willed person, and very curious, and very creative, so consequently when things would break she would try to fix them," Marie Appel said. "And so I was sure that if it was any possibility, she would pull it out, she would make it."

The elder Appel said with a laugh that she would advise her daughter that "four wheels on the solid ground is preferable to sailing," but doesn't think the experience will anchor Jennifer to the land.

"She loved the water, she loved going to Galveston, she's always enjoyed the water," Marie Appel said. "So I doubt that she'll stop, I doubt that she'll stop sailing."

The Navy said the women are upbeat and looking to another adventure, and Jennifer Appel confirmed the experience has not tempered her love of sailing. The sailboat is currently adrift, and the pair hopes that it is found by another ship and can be repaired.

"Well, you gotta die sometime," Appel said. "You may as well be doing something you enjoy when you're doing it."