Who could resent the captain of the British women’s hockey team, Kate Richardson-Walsh, carrying the flag at the Olympic closing ceremony in Rio? Her wife Helen, who was also on the team, had played a pivotal role in their win (on receiving their golds, they became the first same-sex married couple to win Olympic medals). The entire GB team wore jackets that said “thank you” to Brazil in Portuguese and “hello” to Tokyo where the next Olympics takes place. I’m not a sports fan, but as a nation we have been pretty fantastic and it seems entirely appropriate to celebrate the achievements of these athletes and to feel, dare I say it … a little bit proud.

Oh, but here come the begrudgers. We certainly could win a gold for self-loathing whinging. We only got so many medals because of the money thrown at sports through the national lottery. We must not get all puffed up and nationalistic because that is a bad thing. Sport has nothing to do with our place in the world, it merely reveals many of the existing inequalities, and on and on it goes. But surely the fact that in 1996 we came 36th in the medal table, below North Korea, and now we have pipped China, has given some much-needed uplift to a divided country?

Of course, being good at physical jerks does not suddenly make post-Brexit Britain a happy place. We know that the dreamlike quality of the 2012 games, kicked off by Danny Boyle’s bonkers and brilliant opening ceremony, where everyone went mad for Mo Farah and felt the love, did not last. Anti-immigrant and out-and-proud racist discourse has absolutely flourished in the intervening years.

But again in Rio we saw that winners come in all sizes, shades and sexualities and when they do brilliantly everyone gets behind them. I am not always fond of folk wrapping themselves in flags but nationalism is always an imaginary concept that can be mobilised in whichever way we choose. This nationalism – inclusive, warm, sentimental, hardworking – is the one the left should embrace, but is too often embarrassed about. So it leaves nationalism for others to remake in their own brutal image.

The refusal of so many people to understand that globalisation does not work out for everyone, or that mumbling at rallies about internationalism makes few hearts sing, is precisely why so many were out of touch with the result of the EU referendum. Yes, some of it was about Little England, but some of it was about how we define ourselves as a nation. Can we go it alone? Can we punch above our weight? Is this just a post-empire hangover? The answers are complex. The nation represented at the Olympics was at ease with multiple identities – sometimes Andy Murray is Scots, sometimes British. Bradley Wiggins, Nicola Adams and Mo Farah all belong together as champions here.

Telling people that nationalism is wrong and infantile seems to me to misunderstand the mood. Right now we need to ask what kind of country we want to be. As Albert Camus once said, “I should be able to love my country and still love justice”. Surely that is possible. After the ugliness in the run-up to the Brexit vote and immediately afterwards, we were reminded of the best of ourselves in Rio. That is a real victory.