It is the county seat of Marion County and the principal city of the Ocala , Florida Metropolitan Statistical Area , which had an estimated 2012 population of 335,125 .
It is the county seat of Marion County , and the principal city of the Ocala , Florida Metropolitan Statistical Area , which in the 2010 census had a population of 331,298 .