A week ago, the Iranian parliament voted to expel Britain’s ambassador, Dominick Chilcott, in response to economic sanctions over Iran’s nuclear program. Two days later, on Nov. 29, the two British Embassy compounds in Tehran were besieged by students affiliated with the Basij, a paramilitary volunteer militia.

Chilcott, 52, who was deputy chief of mission in Washington from January 2008 until April 2011, described the siege and his escape. Chilcott spoke to us by phone from rural Kent in southern England, where he spent his first weekend back home watching his youngest son playing rugby, having Sunday lunch with three of his four grown children, and checking on the welfare of his terrier, Pumpkin, whom he had to leave behind in Tehran.

Q. The embassy’s main Ferdowsi compound in central Tehran has been the site of many protests, hasn’t it?

A. Yes. But in the five weeks since I arrived in Tehran, we hadn’t had a protest. I’d heard about them, and oddly enough I was quite looking forward to getting in one demonstration before I had to leave. They are generally noisy affairs with lots of chanting and maybe some stone throwing — and there was no reason to suspect this would be any different. The police had told us to expect one, and we approached it the way we would any other demo by going into what we call “lockdown.” The essential staff stays put, locked into the embassy buildings and guard house. Local staff leave. Other staff and spouses went to our second compound, Golhak, a few miles away. We had mobile phones and land lines to stay in touch, and the police didn’t say anything about a demonstration there.

When and how did you realize this was something other than routine?

The first hour or so was much as we expected. It’s hard to know how many students there were — a few hundred, with just under half of them women. I was on the top floor of the chancery building — there were 10 of us up there — and we went to the windows to look down. Stones were hitting the building, and it was intimidating. But it wasn’t until we saw some protesters run across in front of our building, straight to the flagpole, and begin hauling the Union Jack down that we realized things had gone beyond routine. It was a major invasion, and the Iranian police were making no effort to help. We have our own guards, maybe a dozen of them, but they are not armed or equipped to resist this kind of incursion.

The students raised the Iranian flag — though not very well.

Did it make you think back to the crisis of 1979, when 52 Americans were held hostage for more than a year?

I was busy trying to direct our response, and I also had our dog, Pumpkin, in my arms. She hates noise — and the last thing I needed was for her to bolt for cover and disappear. She is a terrier.

There were sounds of students trying to get into our building, smashing the windows. And there were also alarms going off — at 140 decibels. I was in touch with my wife, Jane, who was with Iranian friends, by phone. But it’s alarming for anyone to hear you speak against that background noise. You also have to make a real effort to think clearly and carefully.

Then the students lit a fire below us. Two of my colleagues went down to put it out but couldn’t. I was standing at the top of the stairs, worried that they may have become asphyxiated — and that if anyone came back up, it might be students, not our colleagues. We also knew that the Golhak compound had been attacked, which was very worrying, and, as we learned later, in many ways the seven staffers there had a worse time: They were rounded up and made to sit on the floor in silence for two to three hours while the intruders looted the buildings.

So, yes, the 1979 precedent was always there, but most of the time we were too busy coping with the here and now to think about it.

Eventually, the smoke got so bad I decided we had to evacuate.

You went out with the mob?

We went to the ground floor and looked out through a spy hole in the door, and the invaders seem to have moved on. Strangely, it was a relief to be out on the lawn. I didn’t have a leash for Pumpkin, so I tied my silk tie through her collar. We tried to put the fire out, but the students had taken the heavy metal keys for the hydrants and used them as battering rams. Then we heard the fire brigade coming. This must have been about two to three hours after the start of the protest.

Did you have time to take anything with you?

Again, this is part of our emergency procedure. We each had a small bag with our passports and one or two things — I had a camera and a spare fleece, not much else. The Golhak staff had their bags taken from them and their passports stolen.

It was about then that two plainclothes policemen came up, identified themselves, and told us to take cover in the club, which is set apart from the other buildings.

You trusted them?

I didn’t see any other options.

The club was already trashed, with broken glass everywhere. As dark fell, we sat inside, away from the windows, and waited. Several riot policemen came and stood sentry. But we still didn’t know why the police weren’t there in force to stop the vandals — or how the situation might develop.

In fact, it became absolutely surreal. The students — several hundred of them — were allowed to march in triumph through our compound, as though they were celebrating the climax. A couple of senior policemen and a man from the protocol department of the Ministry of Foreign Affairs came in, and we learned that some senior figure had told the students, enough’s enough, time to go. And off they all went in buses and coaches. The tension dissipated.

So you could leave?

No, this was another alarming time. The police wouldn’t let us leave, and we didn’t know why. They weren’t armed, but they had batons, helmets and body armor. For two to three hours we argued with them. It seems they were keeping us until the chief of police from Tehran had done an inspection tour of the damage. At the end of it, I was allowed to go and talk to him. It was a peculiar confrontation in the middle of the British compound. He said, “It’s okay, I’ve rescued you.” And I said, “This was clearly state-supported, and there will be serious consequences.” He didn’t contest that.

That’s when we were picked up in cars from a friendly embassy.

Could you take any possessions?

Not that evening. There were a total of 23 of us in the two compounds, if you include spouses. Sixteen left first thing in the morning on a plane, with just 130 pounds of baggage between them. Essentially nothing. Just the clothes they were standing in.

The other seven of us returned to the embassy for a few hours to take stock. I went back to the residence to survey the damage and take pictures. Our possessions had just arrived and had been still in boxes. It was all ransacked — our books, piano, our family photographs and pictures, all the stuff you take around the world with you that makes where you live your home. My study was also smashed up, and the hard drive from my computer gone. So it wasn’t just mindless vandalism: They were looting anything that could provide them with information — just as they did in 1979 — to provide them with propaganda about our activities.

Our main interest on that last day was to do the absolutely necessary things — arrange for guards at the compound and for smashed doors and windows to be boarded up or repaired. It was the end of the month, and we took care to pay the local staffers.

We also took down the Iranian flag. But we couldn’t raise the original British one. It had been taken away or burned.

Would you go back?

I would like to go back. Iranians are delightful people, and the vast majority will be appalled by what the regime has done in their name. But as a foreign diplomat, you can’t work in a country that does not respect the norms of the Vienna Convention. So I don’t see how it will be possible to reopen a mission in this place with its fascinating culture and remarkable history.

The day after the attack, Nov. 30, was the anniversary of the famous 1943 dinner held in the residence to celebrate Winston Churchill’s 69th birthday, when he sat between Franklin D. Roosevelt and Joseph Stalin. Jane and I were planning to commemorate that gathering, and I had invited the Russian ambassador and the Swiss ambassador (who represents U.S. interests) to join me as reminders of the ghosts of Stalin, Roosevelt and Churchill. I had got out of our embassy archive the minutes of the conversation held at the Tehran Conference, at which the Big Three planned the strategy against Nazi Germany. The papers were headed “Most Secret.” And they were among the things missing from the study last week. I’m afraid that means our plans for D-Day have been compromised . . .

And Pumpkin?

She is subject of another minor diplomatic controversy, with a number of diplomats from different embassies competing to care for her. We hope to repatriate her soon.