For Shayaan Tahir, it all began when an order he placed on Amazon for a new iPod was rejected because the online giant would not deliver electronics to Pakistan.
Frustrated, he decided to take matters into his own hands and founded one of Pakistan's first e-commerce ventures -- a sector that today is booming.
That was seven years ago. Like thousands of other young Pakistanis, Tahir was working at a call centre in the city of Karachi, the country's violent, freewheeling economic hub located on the Arabian sea.
He had saved hard to buy himself an iPod -- only to have his purchase blocked. He enlisted a cousin in the United States to send him three of Apple's music players. Tahir kept one and sold the other two via classified ads.
And that was when the idea hit him: to create his own Amazon-like site for Pakistan, a country of almost 200 million people that has been all but forgotten by the web giants ubiquitous in the West.
Amazon, for example, can only sell limited products to Pakistan via its British site, at a hefty mark-up.
"Once I realised I cannot buy anything from Amazon... I realised that if I cannot get it and I want something from Amazon then there might be others like me who want the same product," said Tahir, 29.
He launch Homeshopping.pk, an online commerce site that today deals with 500 transactions per day and employs 65 people.
Products are delivered within 24 hours inside Pakistan, and the business primarily takes cash on delivery because most people do not have credit cards. More recently the site began accepting online bank transfers.
Despite some security concerns and a handful of customers who refused to pay for an item once it had been delivered, it's a formula that has so far worked.
Other young entrepreneurs have followed Tahir and today there is a host of online shops selling everything from consumer goods -- shophive.com and daraz.pk -- to real estate -- zameen.com -- and even cars -- pakwheels.com.
- Target: 100 million customers -
Pakistan is better known abroad for its violent attacks by Taliban militants, but these entrepreneurs are more focussed on its 30 million Internet users, roughly 15 percent of the population.
The total volume of online sales was around $35 million last year, according to industry officials -- a tiny fraction of the sales seen by global giant Amazon, Alibaba in China or Flipkart in neighbouring India. But experts agree there is potential.
The arrival last year of 3G and 4G mobile networks -- years behind other emerging markets -- has proved a further boon to online commerce in the country.
"Basically the 30 million could be 100 million in the next few years," said Shaun Di Gregorio, CEO of Frontier Digital Ventures, a venture capital fund based in Malaysia that recently invested in Zameen.com and Pakwheels.com.
"In order to surf, you need a wave, and the wave is here," added Frenchman Gilles Blanchard, co-founder of the site Seloger.com who has invested in Pakistani startup Zameen.com.
Di Gregorio and Blanchard are among the foreign investors who are hoping to cash in ahead of any move by the global giants to acquire local companies.
"When Amazon and Alibaba come in ... they would not want to build anything from scratch. It's going to take too much time," said Muneeb Maayr, co-founder of the site Daraz.pk, which sees around 1,000 sales per day.
His goal is for his firm to one day be acquired by one of the foreign behemoths.
For now, young Pakistani entrepreneurs are battling among themselves for market share, said Maayr, a former investment banker at Bear Stearns.
The rivalry is pushing sites to offer better services and driving up the number of customers, observers say.
Before he invested in Zameen.com, Blanchard admits that he knew "nothing about Pakistan".
"I had heard talk on the TV about the Taliban, tribal zones and stuff, and I thought to myself, why not?" the Frenchman said, eying its large population and little-known local talent.