As a student in his native Scotland, Donald Ritchie became known as a gifted 400-meter runner. At the finish, he always noticed that his competitors were exhausted but that he was barely warmed up. So he moved up through the distances, eventually becoming a marathon runner, once clocking 2 hours 19 minutes 34 seconds in the London marathon. Even after marathons, when his fellow competitors collapsed at the finish line, he found his stamina had barely been tested.

Mr. Ritchie, whose death June 16 at 73 was announced by the International Association of Ultrarunners (IAU), became the United Kingdom’s greatest “ultrarunner” and one of the best in the world. He set international records for distances from 50 kilometers to 200 kilometers and in time-based races of up to 24 hours.

For mountaineers who scale Everest, there is no place higher to summit. For runners like Mr. Ritchie, there was always another yard, mile or horizon. His inspiration helped to increase the number of ultrarunners by 1,000 percent over the last decade, according to the Guardian newspaper.

The IAU, which organizes world championships over ultramarathon distances, said Mr. Ritchie set world records: for 100 miles around a track at London’s Crystal Palace on Oct. 25, 1977, with a time of 11 hours 30 minutes 51 seconds; and for 100K on the same track on Oct. 28, 1978, when he clocked 6 hours 10 minutes 20 seconds.

Fellow distance runner Glen Elliot wrote in 1989: “His 100 mile race at Crystal Palace in the late 70s still staggers the ultra-distance fraternity . . . a phenomenal pace of under seven minutes per mile — yes, for every mile.”

On June 16, 1979, at an event in New York City, Mr. Ritchie set a world road race record of 11 hours 51 minutes 11 seconds for a 100-mile race. Ten years later, running on behalf of the British charity Cancer Research — the disease killed both his parents — he ran from John O’ Groats at the northerly tip of Scotland to Land’s End at the southerly tip of England. He covered the 844 miles in just over 10 days — more than three marathons a day for 10 days. Queen Elizabeth II awarded him an MBE (Member of the British Empire) in 1995.

Notable deaths in 2018 and 2019: Nipsey Hussle, George H.W. Bush, Stan Lee, John McCain, Aretha Franklin and other famous faces we’ve lost

Nipsey Hussle, a Grammy nominated rapper who sought to revive South Los Angeles, died at age 33 on March 31. Read the obituary (Matt Winkelmeyer/Getty Images for Warner Music)

In 2016, he published his autobiography, “The Stubborn Scotsman,” which has become a guidebook for what he himself called “the crazies” — men and women who feel compelled to run until they drop.

In the book “Training for Ultras,” written by his friend, Andy Milroy, Mr. Ritchie explained: “To run an ultra marathon, you require a good training background, and a suitable mental attitude, i.e. you must be a little crazy. A certain type of mentality seems to be advantageous. I think you require to be a calm, determined, patient person with a high toleration for prolonged discomfort and a high capacity for delayed gratification.”

Asked about the secrets of ultrarunning, Mr. Ritchie admitted he never stopped at the portable toilets but preferred to urinate while running. It saved him vital minutes or seconds, he said, and dehydration meant that no one but he would probably notice. Contrary to some reports, he never ran a race in his Scottish kilt, although he once wore it from Scotland to Finland in the hope of getting lifts.

Although he came from a working-class family, Donald Alexander Ritchie was born July 6, 1944, in a famous stately home, Haddo House in Aberdeenshire, Scotland. Its aristocratic owners had allowed the house and estate to be used as a maternity hospital for mothers evacuated from areas still under threat from Luftwaffe bombing, mostly the large shipyard town of Glasgow.

His mother and father had lived in the fishing harbor town of Lossiemouth. It remained Mr. Ritchie’s home town and base for the rest of his life.

He went to the University of Aberdeen, graduating in 1972 with an electrical engineering degree, At 18, he had started as a 400-meter runner with the Aberdeen Amateur Athletic Club. It was only in 1977, at 33, that he realized he had more stamina than most and decided to run for as long or as far he could. That year, he posted a world record for 50K by clocking two hours 51 minutes 38 seconds at Epsom, outside London.

He kept running well into his 60s. Where or whenever he ran, he always tried to get back to his day job on a Monday morning — as a lecturer in electronics at Moray College in Elgin.

In 1983, he married Isobel Stewart. In addition to his wife, of Lossiemouth, survivors include two daughters; a sister; and six grandchildren. His family said he died at his home in Lossiemouth and had heart problems. They did not disclose the immediate cause of death.

Many of the top ultrarunners now are fully professional, earning appearance money, prizes and sponsorships. Mr. Ritchie declined endorsements and other profit-making avenues, other than accepting a sponsor who provided his shoes. “Life in hotels, the travel, the hype, does not appeal,” he once told the Glasgow Herald. “I would not be happy, chasing money.”

Correction: An earlier version of this obituary contained several errors. At London’s Crystal Palace, Mr. Ritchie set a 100-mile track record with a time of 11 hours 30 minutes 51 seconds, not 11 hours 50 minutes 31 seconds. The record was set on Oct. 25, 1977, not Sept. 25, 1977. In New York City, he set a 100-mile road race record in 1979, not 1989. He also had six grandchildren, not five. The story has been revised.