A Florida professor has been arrested after cops said he stalked a doctoral student who spurned him after a few dates.

Ali Borji, 39, who taught at the University of Central Florida's computer science department, was charged with two misdemeanor counts of stalking when he was arrested Thursday at his office.

Investigators said Borji started stalking the woman after they dated last June, watching her at the gym and messaging her, “You should be happy that somebody likes you this much to stalk you,” Fox 35 Orlando reported.

They said at one point Borji sent the woman 800 texts in a single day.

“Our detectives acted swiftly in this case, as the UCF Police Department does when anyone feels threatened," UCF Deputy Police Chief Carl Metzger said, according to the station.

The Orlando Sentinel reported that the woman said Borji resumed stalking her this spring after she took a semester off to get away from him.

On Tuesday, she told police she saw Borji following her in his car, the paper reported.

The arrest affidavit filed with the court stated that Borji "acknowledged he made a mistake and he would apologize to the victim if she was standing in front of him."

Before his arrest Borji tendered his resignation to UCF administrators.

Jail records showed he was released on bail; they did not list an attorney. Fox News' attempts to contact Borji were unsuccessful.

The Associated Press contributed to this report.