Excluding education, women make up nearly half of the roughly 9 million workers in state and local government -- but they remain underrepresented in management and leadership roles. In general, the higher you look on a government's organizational chart, the more likely a position is to be filled by a man.

Not so in Phoenix.

In that city, nearly half of the 36 department heads and other executive positions are held by women, a share that far exceeds the national average. Women head notoriously male-dominated agencies like transportation, water infrastructure and even public safety. In fact, the city of 1.5 million is the largest municipality in the country to have both a female police and fire chief. Women also lead the city's homeland security and emergency management departments, as well as the prosecutor's office.

Nationally, slightly more than 14 percent of city managers and about 30 percent of city and county department heads are women, according to a 2013 survey conducted by the International City/County Management Association.

In public safety, where many people talk about a “brass ceiling” for female employees, the numbers are far lower. Women represent nearly 12 percent of police officers in the U.S., according to FBI data from 2013. Several estimates peg the portion of female police chiefs at less than 2 percent. Firefighting is even more male-dominated -- just 3.5 percent of career firefighters are women. There was no readily available statistics on female chiefs.

So what makes Phoenix different?

For one thing, while women across the country report mental and physical barriers -- such as pregnancy -- that make it difficult to last in public safety, Fire Chief Kara Kalkbrenner and Police Chief Jeri Williams said that wasn’t their experience coming up through the ranks in Phoenix.

“That perception of women not being able to do things? That was never something I encountered,” said Williams.

She and Kalkbrenner have nearly 30 years of experience in their fields and are the city’s first female fire and police chiefs. Williams also previously served as the first female police chief for the city of Oxnard, Calif.

Williams had to navigate pregnancy and the strains of early motherhood during her career, and Kalkbrenner has two step children. While their schedules and hours made things difficult, both say their departments never made them feel like being a parent meant they were a problem to be managed.

“The city accepts that childbearing doesn’t mean you’re incapacitated,” said Williams. “It just means you’re pregnant.”

In fact, Kalkbrenner's long shifts and hours away from home were made bearable by working out alternating schedules with other female colleagues so they could watch each other’s kids.

“It’s really interesting to watch the creation of ingenuity within the service,” she said.

Their experience in Phoenix stands in contrast to tales elsewhere.

In one extreme example, an internal investigation into one of San Francisco’s busiest fire stations last year found that male firefighters embarked on a systematic harassment campaign intended to drive their new female colleague out of the firehouse. The harassment included urinating in her bed and leaving feces on the floor of the women’s bathroom at the station.

But gender inequalities in law enforcement tend to be more indirect than that. Aurora, Ill., Police Chief Kristen Ziman, a former president of the National Association of Women Law Enforcement Executives, has said that as a police academy cadet in the mid-1990s, she felt that she and the other women in her position often “needed to prove themselves.” Women in the academy were automatically considered inferior and only seemed to be able to change this perception by showing the men otherwise, she reported.

Ziman’s experience is an example of the cultural challenges women in public safety and military organizations tend to face, said Heather Hurlburt, director of the New Models of Policy Change initiative at New America, a public policy think tank.

“For all the time that people encounter out-and-out prejudice, a lot of the barriers are much more subtle,” she said. “And they persist in ways that people don’t perceive as sexist, and thus it’s hard to fight.”

Another reason for the lack of women in public safety leadership positions has more to do with the talent pipeline: While more women have entered the field in recent years, it can be harder to find women with the kind of 20-plus years of experience that most police and fire chiefs have.

There's some evidence, though, that that may be changing. Over the past year, more than a dozen cities and townships named their first female police or fire chief, including Oakland, Calif.; Lexington, Ky.; and Miami. (Williams was also sworn in as Phoenix’s chief this past fall.)

In Phoenix, many of the other executive-level changes have been recent as well. Most of the female department heads have been hired by City Manager Ed Zuercher in the past two years. And many of them are homegrown talents. Mayor Greg Stanton attributes the trend not to an outright effort to hire women but to Phoenix simply being a place where labels matter less.

“We don’t have a long history as a big city, which means we don't have a lot of the institutions that older established cities have,” he said. “People don't care what neighborhood you're from or who your family is. Those old institutions can be a stifling thing.”

*This story has been updated to clarify that Kalkbrenner has two step children and was never pregnant while working for the department.