He whooped and screamed, pointing at me and shouting that I was an "enemy combatant" - Adrian Weckler in San Jose
He followed me for a mile, screaming into my ear.
"Al-Qaeda agent, right here."
He had a knife. At traffic lights, he stood a few yards behind me with his hand on its concealed handle. "Stay back," he shouted. "Don't come any closer. You don't attack me. I have a knife. You better get out of town."
He was athletic-looking, aged around 50 and wore a tattered suit, T-shirt and a pair of runners.
I kept walking. The guy is surely harmless, I told myself, he just has mental health problems.
Kabul? The West Bank? No: this was last Tuesday in downtown San Jose, California. Near the centre of Silicon Valley.
For 20 minutes, it continued. He whooped and screamed, pointing at me and shouting that I was an "enemy combatant" and that someone should "call 911". Other people walked by, uninterested.
After about 20 minutes, when we got to the fringes of the city, he grew tired. Roaring one last time, he put his hand on his knife and roared: "Don't come back."
Despite being a bit rattled, I wasn't really surprised. My would-be assailant was one of thousands of homeless and mentally-ill people who roam the streets of San Francisco and San Jose, the world's top tech cities.
San Francisco, supposedly a liberal oasis, is particularly bad. The first thing you see when you enter from the highway is dozens of tent communities. As you progress further through the city streets, you're struck by throngs of people pushing trolleys full of their possessions. Smartly dressed young tech workers weave in and out of them on electric scooters. Others have their face stuck in their Slack-addled phones.
In San Jose, which is about 40 miles south of San Francisco and around 10 miles from the giant campuses of Apple, Google and Facebook, the homelessness problem is not quite as chronic. But it is still utterly normal to see people lying face down on a pavement in the middle of the day. People simply walk past them, sipping iced lattes, tweeting about how awful Donald Trump is.
Or they stay away from the city streets altogether, commuting from their gated homes to their security-controlled work campuses. (They make sure to do so responsibly, though, in a Prius or a Tesla.)
Homelessness in Californian tech centres is not a simple issue.
For decades, other cities have been giving homeless people one-way tickets to the West Coast. New York is the biggest culprit here, with an annual budget of $500,000 (€425,000) for shifting homeless people away. Michael Bloomberg, the would-be Rockefeller liberal critic of Donald Trump, is one of the policy's greatest exponents. A Guardian investigation into the issue last year estimated that half of all homeless evacuations come from New York, with many people ending up in the relatively kind Californian climates of San Francisco, Los Angeles and San Jose. (It's not just bus tickets: New York also gives some homeless people one-way air tickets.)
Even still, if any state can afford to look after a high number of incoming homeless, it's California. Its industry players now dominate global business, creating unprecedented wealth over the last decade. San Francisco is basically Manhattan in the sun, with obscene amounts of money within its borders.
The trouble is that no-one really seems to care. Politicians know that they will always be elected by middle-class people with middle-class economic challenges.
This month, there was a flashpoint between homeless people and electric scooters, the latest US city tech craze.
The scooters act like Dublin Bikes, except they don't need a designated stand: they're just left anywhere on the pavement. For a small fee, you can activate them and zip somewhere else in the city before logging off and leaving the scooter anywhere on the pavement.
Naturally, San Francisco city officials have been moving homeless people on to make room for the electric scooters.
"It's absurd that scooters have more rights than the homeless do," Chirag Bhatra, a protester, told the San Francisco Chronicle.
The protests will probably be in vain. One of the scooter companies, Bird, has just raised $150m in funding and is now valued at $1bn. As a prized 'unicorn' in California, it can be expected to win any debate over the issue. (Back east, one city - Nashville - has made Bird suspend its scooter deployment, citing a need for greater controls and regulation.)
As for local politicians, even liberal Democrats seem to care more about net neutrality than homelessness.
"This Google employee was born and raised in San Francisco," tweeted liberal state senator Scott Wiener, in response to the scooter protests. "Protesters yell at him that he's a sell-out. I thought we 'wanted' our SF kids to grow up, stay in SF, access these 21st century jobs and make great lives for themselves in our city."
In other words: 'Stop protesting, stop rocking the boat.'
Local churches, for their part, can only do so much.
That leaves California's tech leaders, the richest of the rich.
Their attitude, it seems, is either to ignore the issue or to shrug their shoulders and say it's a job for politicians, even as they pocket giant tax cuts that make them richer and city facilities poorer.
Push them on the issue and some will even claim that they are helping in their own way.
"We're building amazing things for the world," they say, adding that they'd "definitely" have voted for Clinton and not Trump.
How long can such a situation prevail? San Francisco is becoming a dystopian vision of the future, a Black Mirror plot. Latte-sipping venture capitalists and star engineers live alongside an increasing number of utterly destitute people.
When will great responsibility come with great power?
Sunday Indo Business