Spectators in the VIP section of the FIFA World Cup tend to be a far more sedate and stolid crew than fans elsewhere in the stadium. At Sunday’s final between France and Croatia, though, Croatian president Kolinda Grabar-Kitarović was a literal bright spot in the crowd.

Dressed in a red-and-white team jersey, Grabar-Kitarović spent most of the game on her feet, cheering in support of a squad that ultimately lost the final 4-2. Before being invited into the VIP box as a guest of Russian President Vladimir Putin, Grabar-Kitarović watched every single one of her team’s appearances from the stands with fellow Croatia fans.

Being a visible booster for a winning team is one of the fun parts of being a leader. Croatia has never advanced to a world cup final before and the team, led by captain (and former refugee) Luka Modric, were national heroes.

But when it was over and Croatia was left to reckon with the deeply disappointing defeat, Grabar-Kitarović was as present and supportive as she’d been during their ascent. She embraced a shattered Modric after he was presented with the Golden Ball, the tournament’s most valuable player award. A hard rain started to fall during the final award ceremony. As handlers rushed to put umbrellas up over the heads of Putin and other dignitaries, Grabar-Kitarović stood in the rain to shake the hand of every player on both teams.

Being willing to stand up and project a steady and positive presence in times of disappointment is one of a leader’s most important tasks. The late South African president Nelson Mandela was an advocate of this view. “It is better to lead from behind and to put others in front, especially when you celebrate victory when nice things occur,” goes one quote widely attributed to the late leader. “You take the front line when there is danger. Then people will appreciate your leadership.”

Consoling a losing soccer team hardly counts as danger, nor is it the most challenging part of Grabar-Kitarović’s office. But projecting a sense of unity and unwavering commitment is a necessary and important part of the job. (Grabar-Kitarović is Croatia’s head of state, not its head of government, a role currently filled by Prime Minister Andrej Plenković.)

A former Fulbright scholar, ambassador to the US, and assistant secretary to NATO, Grabar-Kitarović is leading an emerging eastern European economy at a tremendously precarious time for the postwar global order, and only a few decades removed from the region’s bloody civil war. Standing by the team during its moment of public disappointment is as powerful a statement as celebrating in the good times.

The value of leadership above partisanship in fact written it into Croatia’s constitution. Prior to her election in 2015, Grabar-Kitarovićwas a member of the center-right Croatian Democratic Union, but resigned immediately from the group upon election. Presidents in Croatia can’t hold any party affiliations in office. As leaders they must represent an entire nation, and there can’t be any question of whose team they are on.