SAN JUAN, Puerto Rico — A Delta Air Lines pilot arrested a passenger who tried to enter the cockpit in an incident that forced a New York-bound plane to return to Puerto Rico on Wednesday, authorities said.

Puerto Rico police said that 30-year-old Carlos Ramírez Rodríguez became aggressive and tried to enter the cockpit.

Police said he yelled, "I am God. Tomorrow San Juan is going to disappear. I came to save the world, and I'm going to end terrorism."

It is unclear whether Ramírez has an attorney.

Police said the FBI is investigating the incident aboard Flight 579.

FBI spokeswoman Limary Cruz-Rubio said she did not immediately have further details.

Delta did not immediately return a message for comment.