PALO ALTO — For the first time ever, Apple (AAPL) released two iPhones simultaneously, but fans did not get double the choice, as a widespread shortage kept supplies low in stores.

The dual iPhone release finished out a tumultuous couple of weeks for the tech giant, which took a hit on the stock market, rebuffed backlash over the pricing of its low-cost iPhone option and discovered a security glitch in its new operating system. The pressure was on for Apple to post big sales of the new iPhone 5C and iPhone 5S, and assure consumers and investors that the Cupertino company still had something revolutionary up its sleeve.

Apple fans turned out in droves to stores across the Bay Area, many camping in line for days in hopes of getting one of the coveted iPhone 5S, the company’s new flagship device loaded with Apple’s latest and greatest. On Palo Alto’s University Avenue, fans got another surprise when the store opened Friday morning — an upbeat Apple CEO Tim Cook, who shook hands, posed for pictures and joined the crowd for a few celebratory cheers.

Cook then paid a visit to the store at Stanford Shopping Center and later sent his first tweet: “Seeing so many happy customers reminds us of why we do what we do.”

First in line to meet Cook and get the new iPhone was a group from San Jose-based Gift A Vet, an organization dedicated to supporting veterans in need. Dorothy Arndt said she had been camped out since Monday, trading 12-hour shifts with vets and colleagues. She left the store with a 16GB iPhone 5S in “space gray” to give to a 53-year-old disabled Santa Clara County veteran struggling to make ends meet on public assistance.

The iPhone 5S rolled out in metallic colors and with super-speedy processing power and upgraded camera features, and the lower-cost, heavier iPhone 5C is offered in a spectrum of candy-coated colors. Along with the U.S., Australia, Canada, China, France, Germany, Hong Kong, Japan, Puerto Rico, Singapore and the U.K. launched the iPhone 5S and 5C on Friday.

But Apple released only a limited number of the coveted iPhone 5S for the worldwide launch and only a handful of those in gold — the color that most fans were lusting after.

“Everyone wanted gold,” said Benjamin Smith of Sunnyvale, who settled for gray at the University Avenue store.

The iPhone 5C was more plentiful, but few fans were willing to pull out their credit cards for what some have called a repackaged version of the older iPhone 5, dressed in colorful plastic. It starts at $99.

Megan Davidson, 21, arrived at the Sprint store in Palo Alto at 3:45 a.m., where she avoided the crowd at the Apple store and was first in line for the 5S.

“I think the 5C is more geared toward kids and cheaper,” she said. “I want the legit Apple phone.”

Shortages of the iPhone 5S were apparent in stores across the Peninsula, with websites showing shipments delayed until October. The location at Stanford Shopping Center ran out of unlocked units — phones sold without the software code that limits them to work only on one wireless carrier — before 9:30 a.m. An employee said the gold phones were first to go and the store had “a very limited number.”

The Best Buy on Almaden Expressway in San Jose had 28 units of the 5S and sold out before 11:30 a.m., said store manager Mark Fragoza. The store had more than twice as many phones when the iPhone 5 launched last year.

The picture wasn’t much better on the other side of the pond. Carriers in the U.K. told the BBC there was a severe shortage of the iPhone 5S, and customers in Asia and Australia were told they’ll have to wait until October.

“Demand for the new iPhones has been incredible and we are currently sold out or have limited supply of certain iPhone 5S models in some stores,” Apple spokesman Bill Evans said Friday.

Opening-weekend sales are crucial for Apple after about a year without releasing a new device while rivals have begun to chip away at Apple’s dominance in the smartphone market. Piper Jaffray analyst Gene Munster said in a note to investors he expected Apple would sell 5 million to 6 million iPhones, including pre-sale orders that started Sept. 13. BTIG analyst Walter Piecyk wrote that he was encouraged because “lines were the strongest we have seen at both Apple and carrier stores” but wouldn’t know until Monday if unit sales would meet his expectations of 6 million during launch weekend.

Apple has reportedly asked its suppliers to increase production of the gold-colored iPhone 5S by an additional one-third after seeing strong demand, people familiar with the situation told The Wall Street Journal on Thursday. What remains unclear is whether there are still manufacturing constraints that may keep supplies low.

Apple did not respond to questions Friday about production.

Contact Heather Somerville at 510-208-6413. Follow her at Twitter.com/heathersomervil.