"The End" is the 20th and final episode of the fifth season, and 117th overall of the science fiction television series The X-Files. The episode first aired in the United States and Canada on May 17, 1998. "The End" subsequently aired in the United Kingdom on March 17, 1999 on BBC One. The episode was written by executive producer Chris Carter, and directed by R. W. Goodwin. "The End" earned a Nielsen household rating of 11.9, being watched by 18.76 million people in its initial broadcast. The episode received mixed to positive reviews from television critics.