LAS VEGAS — A 23-year-old contestant from Brooklyn, N.Y., won the title of Miss America.

Mallory Hagan won the Las Vegas beauty pageant Saturday night after tap dancing to James Brown’s “Get Up Off of That Thing” and answering a question about whether armed guards belong in grade schools by saying we should not fight violence with violence.

Hagan defeated Miss South Carolina Ali Rogers, who took second, and Miss Oklahoma Alicia Clifton, who finished third.

Hagan wins a $50,000 college scholarship and gets the crown for one year.