The first openly gay US Secretary of the Army Eric fanning rode in the San Diego Pride parade on Sunday in an open car with boyfriend Ben Masri-Cohen.

Fanning spent the weekend in the sunny California city and also appeared at a rally and at a San Diego Padres baseball game.

His appearance came just weeks after the US military announced it would begin to allow transgender military personnel to serve openly for the first time.

‘For many in our military, Pride in San Diego has special meaning,’ Fanning told an audience at the Spirit of Stonewall rally Friday evening at Balboa Park.

‘With their actions, they sent a clear message to our country: That it’s possible to take deep pride in being part of two great families, the U.S. military and the LGBT community.’

He also addressed critics who are against allowing transgender people to serve openly.

‘Today, when our critics say that the military is not a place for social experimentation, they may be right. But equality and inclusivity are not experiments. They are American values.’

Manning later told the San Diego Union-Tribune: ‘I want to be able to recruit from the broadest base of people possible who meet the requirements. So why shouldn’t we open up service to those people who meet those requirements that are all about the job and the mission? … People who just want to serve.’

Fanning, 47, also spoke at the rally of the 12 June shooting massacre at the Orlando nightclub Pulse that killed 49 people and injured 53 others.

‘We should come together, even as we grieve and mourn,’ Fanning told the crowd. ‘Because we must respond to acts of cowardice with acts of confidence, with acts of pride in who we are and what we believe.’

His nomination last fall by President Barack Obama came just five years after the historic end of Don’t Ask, Don’t Tell.

That law prohibited gay, lesbian and bisexual Americans from serving in the US armed forces openly.

Enacted in the 1990s, DADT prevented Fanning from joining the military himself.