Mike McMahan, the creator of “Star Trek: Lower Decks,” is cementing his future at CBS Studios.

The writer and producer has inked a new two-year overall deal with the studio. Under the pact, CBS Studios will have the exclusive rights to produce all TV content created and developed by McMahan.

News of the deal comes exactly two months after “Lower Decks” wrapped its 10-episode first season run on CBS All Access. The animated series, which represents the first true “Star Trek” ever, is set aboard the U.S.S. Cerritos, one of the less important ships in Starfleet, and is in the same part of the “Star Trek” timeline as “Next Generation,” “Deep Space Nine,” and “Voyager.”

McMahan’s deal was announced by Alec Botnick, senior vice president of comedy development and head of animation at CBS Studios.

“We feel so fortunate that Mike chose to partner with us for this next stage of his career,” said Botnick. “He is a true savant whose passion for and knowledge of animation is inspirational. Being able to be a part of his journey and helping him realize the stories he wants to tell, and how he wants to tell them is the reason many of us got into this business.”

Alongside “Lower Decks,” McMahan delved into space a second time earlier this year with Hulu’s “Solar Opposites.” The animated comedy about a family of aliens forced to take refuge in middle America was handed a season 3 renewal in June.

“I’m so excited to continue my television journey with my friends at CBS,” said McMahan in a statement. “I’ve always wanted to be allies with a corporation whose logo is a giant, unblinking eye. I think we’ll be able to make some truly weird stuff together.”

Previously, McMahan was head writer and executive producer on the wildly popular Adult Swim animated series “Rick and Morty.” His history with “Star Trek” stretches back to 2011, when he was hired by Simon & Schuster to write a readers’ guide to a fictitious season 8 of “Next Generation” titled “Star Trek: The Next Generation: Warped: An Engaging Guide to the Never-Aired 8th Season.”