The economies of Maine's largest metropolitan areas grew in 2017, but not at the pace of the national growth rate.

According to data released Tuesday by the federal government, real gross domestic product in the Portland-South Portland area increased 1.7% to $32.1 billion, and in Lewiston-Auburn grew 1.4% to $4.2 billion. Bangor's GDP grew 0.9% to $6.1 billion.

Economies in 383 U.S. metro areas grew by an average of 2.1%, according to the U.S. Department of Commerce Bureau of Economic Analysis, with GDP increasing in 312 of those areas.

Professional and business services, trade, finance and real estate were some of the economic sectors driving growth in Portland-South Portland and Lewiston-Auburn, according to the report. In Bangor, major drivers included education, health and social services.

Across New England, changes in GDP ranged from 2.8% growth in metro Boston to a 3% decline in the Bridgeport-Stamford-Norwalk area of Connecticut.

Nationwide, changes in metro GDP ranged from 12.1% growth in Odessa, Texas, to a decline of 7.8% in Enid, Okla.