From 1997 to 2005, Anderson starred as Jack O'Neill in Stargate SG-1, based on the movie Stargate starring Kurt Russell and James Spader. John Symes, president of Metro–Goldwyn–Mayer (MGM), called Anderson himself and asked him if he wanted a part in the series. Anderson watched the Stargate film over and over again and came to the conclusion that the film had "great potential" and signed a contract with the Stargate producers. Anderson agreed to become involved with the project if his character was allowed significantly more comedic leeway than Kurt Russell's character in the feature film. He also requested Stargate SG-1 be more of an ensemble show so that he would not be carrying the plot alone as he did on MacGyver. In season eight, he chose to have his character "promoted" to base commander on Don S. Davis's advice. This enabled Davis to retire from acting due to his ailing health and Anderson to take over the smaller role which involved far less on-location shooting so that he could spend more time with his young daughter. The following season, Anderson terminated his status as star and producer of Stargate SG-1 opting to make several guest appearances per season instead, allowing his sizable role to be filled by veteran actors Ben Browder (replacing Anderson as field commander), Claudia Black (replacing Anderson as the comic relief) and Emmy nominee Beau Bridges (replacing Anderson as Base commander).