A Santa Clara elementary school principal was arraigned Monday on six drug charges, including one that he offered methamphetamine to an undercover narcotics agent he met on a gay dating website.

Eric Lewis, 42, principal of Montague Elementary School for seven years, was arrested Thursday at the Caltrain station at Fourth and King streets in San Francisco.

The arrest followed a tip to the Santa Clara County drug task force that Lewis might be involved in drugs. An undercover drug agent contacted Lewis on a dating site and began exchanging text messages, authorities said.

During those messages, Lewis allegedly offered to furnish drugs to the officer, said Michelle Gregory, a spokeswoman for the California Department of Justice.

With that information, the task force secured a search warrant for Lewis' San Francisco apartment, and the agent set up the meeting at the Caltrain station, Gregory said.

When officers searched his apartment Thursday, they found a quarter-ounce of methamphetamine, eight ecstasy pills and three vials of GHB, a date-rape drug, according to Sean Webby, spokesman for the Santa Clara County district attorney.

Investigators also found scales and plastic baggies consistent with drug sale operations, and they confiscated his computer at home as well as the computer he used at the school.

Lewis was charged Monday morning in Santa Clara County Superior Court with five felony drug counts, including transportation, sale or distribution of methamphetamines and GHB. He is also accused of possessing methamphetamines, GHB and ecstasy pills for sale, and one misdemeanor count of possessing drug paraphernalia, prosecutors said.

He is scheduled to enter pleas on Friday.

He is in the Santa Clara County Jail in lieu of $25,000 bail.

There is no evidence that Lewis' alleged drug deals ever involved the school or took place there, although Lewis did occasionally text-message the undercover officer during school hours, Gregory said.

Officials with the Santa Clara Unified School District said they were surprised by the arrest and described Lewis was a good principal who led his school to a rise in academic performance during his tenure.

"It was a complete shock for us," said Tabitha Kappeler-Hurley, a spokeswoman for the district. Lewis was "very collegial, very friendly - a good principal."

Lewis is on unpaid administrative leave, and Barbara Friedenbach, a veteran district employee, will serve as interim principal. Montague Elementary offers grades kindergarten through fifth grade and enrolls around 400 students.