NEW YORK, NY — New York City was recently named the best place to celebrate the United States' birth. But that national pride is only skin deep — New York is actually the fifth least patriotic state in the country, according to a new WalletHub study.

The personal finance website ranked the "most patriotic" U.S. states based on 13 factors indicating their levels of military and civic engagement. New York ranked 46th overall and last in terms of military engagement, which was measured by the number of military enlistees, active-duty personnel and veterans, as well as the share of the adult population in military reserves.

The Empire State has the fewest veterans per capita and half as many as Alaska, which has the most, WalletHub found. New Yorkers aren't so great when it comes to civic engagement, either. The state ranks 25th in the nation overall in that category, which includes factors such as 2016 election turnout, jury participation and civics education requirements.

New York has the third-lowest volunteer rate in the nation, WalletHub found, ranking ahead of just Florida and Mississippi. The state's restrictive election laws probably don't help its ranking for voter turnout. New York ranked 41st in the nation for 2016 election turnout with 57.3 percent of eligible voters casting ballots, according to a Nonprofit VOTE report published last year.

Only four states are less patriotic than New York, according to WalletHub's study: Illinois, Rhode Island, New Jersey and Massachusetts.