The pilot episode of the television series Veronica Mars premiered on UPN on September 22, 2004. It was written by series creator Rob Thomas, and directed by Mark Piznarski. Set in the fictional town of Neptune, the pilot introduces Kristen Bell as the title character, a high-school student moonlighting as a private investigator under the wing of her detective father. Two separate mysteries are presented in the episode, which are explored throughout the season and resolved in the final and penultimate episodes.

Thomas originally wrote Veronica Mars as a young adult novel, featuring a male as the protagonist. He changed the gender of the protagonist because he thought a noir piece told from a female point of view would be more interesting and unique. The original pilot script was darker in tone than the one filmed, and several details were changed. Although it ranked low in the ratings, the pilot was critically acclaimed and Bell's performance as the protagonist was praised.

Plot Flashbacks reveal Veronica's backstory: in small-town Neptune, California, Veronica – daughter of well-respected County Sheriff Keith Mars (Enrico Colantoni) is a typical teen who was dating Duncan Kane (Teddy Dunn), and was popular with loving parents. But when her best friend and Duncan's sister, Lilly Kane (Amanda Seyfried), is murdered, Veronica's life falls apart. Keith accuses software billionaire Jake Kane (Kyle Secor), Lilly's father, of being involved in the murder. This provokes Neptune's wrath, and Keith is ousted from office and replaced by Don Lamb (Michael Muhney) in a recall election. Veronica's mother, Lianne Mars (Corinne Bohrer), unable to face the loss of status and economic security, develops a drinking problem and suddenly leaves town. Veronica's boyfriend also ends their relationship, and her friends turn their backs on her. To prove that she is unaffected by the rejection, Veronica attends wealthy classmate Shelly Pomroy's "09er" party. Her drink is spiked with GHB and she is raped, but Sheriff Lamb refuses to take her report seriously. These events shock Veronica and she changes her attitude towards her former friends, becoming tough and cynical.

Estranged from all her "09er" friends—wealthy students from the fictional 90909 ZIP code—including Duncan and Lilly's ex-boyfriend, Logan Echolls (Jason Dohring), and feeling the drop in income and status that her father's dismissal from office brings, Veronica takes a part-time job in her father's newly opened private investigation agency, Mars Investigations. Although the case of Lilly's murder is officially closed following the confession of a former Kane Software employee, Abel Koontz (Christian Clemenson), Veronica continues her own investigation into what happened. Her investigation discovers new evidence which suggests that Koontz is innocent.

In the present, Veronica starts her Junior year at Neptune High by freeing new student Wallace Fennel (Percy Daggs III), who had been stripped and duct-taped to the school flag pole. Wallace explains that while working at the local Sac-n-Pac, he alerted the sheriff's department to two PCH (Pacific Coast Highway) bikers who took alcohol without paying. Sheriff Lamb exposes Wallace as the witness, and despite Wallace's attempts to retract his accusation, Lamb walks away with proof from the in-store video camera. Wallace's duct-taping is PCH retribution for his honesty. In a convoluted scheme to help Wallace, Veronica sets up Logan by placing a bong in his locker. Once the bong is taken to the evidence room at the sheriff's department, Veronica triggers it to smoke and spark by remote control, leading to the arrival of the fire department. The fire chief, a friend of Veronica, switches the video from the Sac-n-Pac with one Veronica filmed of a deputy receiving sexual favors. When the bikers are in court, that video is shown instead, embarrassing Lamb and undermining the case against the bikers. Wallace is forgiven and Eli "Weevil" Navarro (Francis Capra), the bikers' leader, becomes Veronica's occasional ally.

At Mars Investigations, Duncan and Lilly's mother, Celeste Kane (Lisa Thornhill) hires Keith to ascertain if her husband Jake is having an affair, despite her open contempt for both Keith and Veronica. Keith is busy with other projects, and Veronica takes it upon herself to follow Jake. Veronica takes photos of him at the Camelot hotel as he meets with an unseen woman after midnight. Once Keith sees the license plate number of the woman's car, he stops the investigation and files the photograph. Puzzled by his actions, Veronica finds the file and learns that Keith has continued his own personal investigation of Lilly's murder. Veronica discovers that the car belongs to her missing mother, Lianne, and begins to investigate the murder herself.

Production

Conception Rob Thomas originally wrote Veronica Mars as a young adult novel for publishing company Simon & Schuster. Prior to his first television job on Dawson's Creek, Thomas sold two novel ideas. One of these was provisionally titled Untitled Rob Thomas Teen Detective Novel, which formed the basis for the series. The novel had many elements similar to Veronica Mars, however the protagonist was male. Thomas's father was a vice-principal at Westlake High School in Austin, Texas, and the main character attended a "thinly disguised version" of the school. As Thomas had begun writing for film and television, he did not resume his teen detective idea for several years. Writing a novel could take months for Thomas, whereas a television script only took several weeks. Knowing that television scripts paid more, Thomas wrote the television version of the teen detective project as a spec script before it became a novel. Since no studio or network had asked him to write it, and he would not get paid unless it sold, Thomas said that "it was never a very pressing project for me". Tinkering with it from time to time, Thomas wrote project notes a year before he actually started writing the television script. Most of his original ideas made it into the script, but some changed drastically. Thomas wanted to use flashbacks, and he had to shorten the timeline so that the murder could happen in a recent time. Thomas changed the gender of the protagonist because he thought a noir piece told from a female point of view would be more interesting and unique.

Casting

Kristen Bell was chosen to portray Veronica Mars from more than 500 women who auditioned for the role. On casting the lead role, Thomas later commented, "When you're casting 20-year-old hot girl, you see a lot of bad actors." Bell felt that it was "just luck" that Rob Thomas saw that "I have some sass to me, and that's exactly what he wanted". Bell thought that it was her cheerleader looks and an outsider's attitude that set her apart from the other women who auditioned. Bell's life shared many similarities with that of her character—her father had "an investigative bent", and her best friend died in high school in a car crash.

Jason Dohring, who played Logan Echolls, originally auditioned for the role of Duncan Kane. Teddy Dunn originally auditioned for Logan, but ended up portraying Duncan Kane. Dohring felt that his audition for Duncan "was a little dark", and he was told by the producers that it was "not really right". The producers asked Dohring to read for the role of Logan, which involved reading Duncan's lines. Dohring acted one scene from the pilot, in which he shattered the headlights of a car with a crowbar. During the final auditions, Dohring read two times with Bell and met with the studio and the network. When reading with Bell, Dohring acted the whole scene as if he had raped her, and tried to give the character an evil and fun feel. At the time of Dohring's audition for Logan, the character was only going to be a guest star in the pilot.

Percy Daggs III auditioned for the role of Wallace Fennel twice before being cast, and he had to go through three tests with the studio and network executives. During his first audition, Daggs read four scenes from the pilot. Before his studio test, Daggs read with Bell and had "a great conversation". He said that she "made me feel comfortable about auditioning" and was a big reason why he became more comfortable playing Wallace as the season went on. Thomas described Amanda Seyfried, who portrayed the murdered Lilly Kane, as "the biggest surprise of the year". When casting a series regular, he was able to see all the best actors in town, mainly because they all wanted to be a series regular. When casting Lilly, who would only appear from time-to-time as "the dead girl", Thomas did not receive the same level of actors. Thomas said that he had "never had a more cut and dried audition" than he did with Seyfried; she was "about 100 times better than anyone else that we saw, she was just spectacular". He said that she ended up being so good in the series that he used her three or four times more than he initially planned.

Filming The original pilot script was darker in tone than the one filmed. Thomas intended to take the script to FX, HBO or Showtime, but gave UPN "credit" as they only wanted it a bit lighter to match their standards and practices. There was also a lengthy debate as to whether Veronica could be a rape victim; UPN eventually consented. In the aired version of the episode, Lilly Kane was found by the pool in the same spot where she was murdered. However, Thomas stated that Lilly's body was originally going to be found in the ocean, and he had a plan for events which led to Lilly's body being dumped. When Thomas pitched the idea to UPN, the network felt that it was "too dark and creepy" for Jake Kane to dispose of his daughter's body to protect his son, and the idea was changed. Much of the series' scenes were filmed at Stu Segall Productions in San Diego. During the filming of the pilot, producer Paul Kurta said that much of the filming would take place in Oceanside, California. Kurta liked that it was "a seaside town that still feels like middle-class people live there ... Most of the seaside towns feel resort driven." The setting of Neptune High, which was featured in the first two seasons, was also located in Oceanside. The school, Oceanside High School, was paid $7,750 by Stu Segall Productions for the use of the campus and extras. When Thomas watched the final cut of the scene in which Veronica realizes that she has been raped, Thomas thought that he had cast the role correctly. "I’m watching her from the monitor, and tears start streaming down her face, and I’m just like, 'Holy shit! We have a star!'"

Music