He hounded network executives at all hours, demanding Nielsen reports and asking: “How’d we do? How’d we do?”

He routinely fibbed about ratings, declaring “The Apprentice” the No. 1 show on television even when, as NBC officials would sheepishly admit, it was not.

And he demanded a raise to $6 million from roughly $50,000 an episode during a lunch with Jeff Zucker, then head of NBC. It was only fair, he explained, because the cast of NBC’s sitcom “Friends” earned the same amount — combined.

With its glamour and famous catchphrase — “You’re fired” — “The Apprentice,” which debuted in 2004, was the ultimate showcase for Donald J. Trump’s self-styled image as a power-wielding mogul. But it also served as a prequel of sorts for his improbable next act as a presidential nominee, who next week will return to prime time as the ringmaster of the Republican National Convention.