PASADENA, Texas -

An armed man was arrested Tuesday as high school students were locked down, and police said the man was headed to a school to settle a score with a student.

The 2,600 students at Sam Rayburn High School, 2121 Cherrybrook, were placed on lockdown after 9 a.m. when police got a call that a rifle had been stolen from an apartment in the  3100 block of Spencer Highway.

The tenant told police that her ex-boyfriend stole the rifle while stating he needed it to exact revenge on a Rayburn High student whom he believed had stolen from him in the past.

Police said the man told his ex-girlfriend that he planned to use that rifle at the school, or track down the student where he lived.

Pasadena Independent School District Superintendent Kirk Lewis said the school was immediately placed on lockdown and officers converged on the campus.

City police then spotted the car that was described by the gun-owner, and officers surrounded that car in the 900 block of Hector Street, about a mile from the school.

The man was arrested and the gun was recovered and police said he was caught before making it anywhere near the school.

The lockdown was lifted around 10 a.m., after police conducted a standard room-to-room search of the school.

"I was relieved that they caught the guy," senior Kelsey Davis said. "I was pretty scared at the same time. What if they didn't catch him and something would have happened?"

The armed man's name and age were not released, but the district said he was not a current student.

The man's neighbors said he is a welder in his 30s and was never a student at the school.

Police were planning to interview the man and file charges sometime on Wednesday.