JAKARTA, Indonesia — The two houses where he spent part of his boyhood stand pretty much the way they did when he went back to Hawaii four decades ago. The two schools he attended have grown larger but, in spirit, remain unchanged. Some of his old friends can still be found around the neighborhood.

Near one of his homes here, the same family still runs a wooden stall selling gado-gado, an Indonesian salad covered in peanut sauce. Agus Salam, who took over the business from his mother years ago, played soccer with the American boy everybody here called Barry.

“His house — all the houses around here — haven’t changed,” said Mr. Salam, 56.

When President Obama visits Jakarta on Tuesday, he will find a city that, in some ways, has changed beyond recognition. A city of one luxury hotel and one shopping mall when Mr. Obama lived here between 1967 and 1971, Jakarta is now the overextended and overcrowded capital of the world’s fourth most populous nation. But Jakarta’s neighborhoods, including the two where Mr. Obama lived, retain enough of their former selves that the president would quickly find his bearings.

Jakarta regards Mr. Obama as a local boy made good, and he remains extremely popular throughout Indonesia. But his last-minute postponements of three previously planned visits here have clearly sapped the enthusiasm surrounding his homecoming, even among his most ardent supporters.

“He’s not as popular here as he was before,” Mr. Salam said.

In 1967, Indonesia was still reeling from the aftershocks of an attempted Communist coup that led to the killing of at least 500,000 people. Suharto, the general who would rule Indonesia through the late 1990s, was about to assume power and launch an authoritarian era called the New Order.

Mr. Obama, his mother, Stanley Ann Dunham, and his Indonesian stepfather, Lolo Soetoro, moved into a one-story house in a district called Menteng-Dalam. At the time, it was a new neighborhood where natives of Jakarta, known as Betawis, lived with an increasing number of newcomers from different corners of Java and Sumatra, the main islands in Indonesia. The area was connected to the electric grid only a couple of years before Mr. Obama moved in.

“It was a very poor area when the family came here,” said Coenraad Satjakoesoemah, 79, a retired airline manager and a neighborhood leader. “There were still dirt roads, only a few houses and lots of large trees.”

In Mr. Satjakoesoemah’s living room, Mr. Obama’s mother taught English to the neighborhood women, including his wife, Djumiati. While the residents regarded Mr. Obama’s mother as a “free spirit,” Barry, who was chubby, was referred to as the “boy who runs like a duck,” said Mrs. Satjakoesoemah, 69.

Mr. Obama, the couple said, attended school with children who could not afford to buy shoes.

The school — Santo Fransiskus Asisi, a Roman Catholic school that had been founded just in 1967 — is still located a couple of blocks away. When the 6-year-old Barry entered the school, there were only three grades with a total of 150 students. Now, about 1,300 students from kindergarten through high school study there, said the principal, Yustina Amirah. Mr. Obama has spoken about growing up here and hearing the Muslim call to prayer, but Ms. Amirah said that since the school’s founding, everyone had hewed to the institution’s official religion.

“Barry followed church services like everybody else,” Ms. Amirah said.

Sometime in the third grade, after his family moved to a different part of the city, Mr. Obama transferred to Elementary School Menteng 1, possibly the most famous primary school in Indonesia. Founded as a Dutch colonial school in 1934, it has long drawn the children of the country’s ruling class because of its location in Menteng, traditionally the wealthiest residential neighborhood in Jakarta.

Nowadays, though many wealthy Indonesians send their children to international schools here, the Menteng public school still draws the children of the elite, so much so that the principal, Hasimah, said she could “count on one hand” the students, out of a total of 400, who are not driven to school every day by their parents or drivers.

A mosque was built on the school grounds in 2002, a sign of the growing influence of Islam in Indonesia’s public life. But the school four decades ago did not even have a prayer room, in keeping with the state’s secularism at the time, Ms. Hasimah and students from the era said.

During the presidential campaign of 2008, right-wing American groups spread rumors that Mr. Obama had attended a radical madrasa while living here. Though most of the Menteng school’s students have always been Muslim, Rully Dasaad, 49, a former classmate, chuckled at the idea that of all schools in the country, Menteng was equated with a madrasa.

“I was brought to school in a Cadillac,” Mr. Dasaad said.

But Mr. Obama’s family did not live in the exclusive Menteng district. The family stayed instead in a far humbler neighborhood called Matraman-Dalam, on a short block of single-story, detached houses, a stone’s throw from a traditional Indonesian neighborhood of narrow, winding streets.

Though he lived in that neighborhood for only two years, Mr. Obama left a lasting impression because of his outgoing and sometimes rowdy personality.

“Barry was so naughty that my father even scolded him one time,” said Sonni Gondokusumo, 49, a former neighbor and classmate.

Mr. Obama’s family rented the guest house inside a compound belonging to a prominent physician. There, according to the neighborhood’s longtime residents, the young Obama, who had already experienced differences in class and religion in his short stay in Indonesia, was exposed to another aspect of Jakarta’s diversity.

His nanny was an openly gay man who, in keeping with Indonesia’s relaxed attitudes toward homosexuality, carried on an affair with a local butcher, longtime residents said. The nanny later joined a group of transvestites called Fantastic Dolls, who, like the many transvestites who remain fixtures of Jakarta’s streetscape, entertained people by dancing and playing volleyball.

In the compound, Mr. Obama often played with the two sons of the physician’s driver.

One time, recalled the elder son, Slamet Januadi, now 52, Mr. Obama asked a group of boys whether they wanted to grow up to be president, a soldier or a businessman. A president would own nothing while a soldier would possess weapons and a businessmen would have money, the young Obama explained.

Mr. Januadi and his younger brother, both of whom later joined the Indonesian military, said they wanted to become soldiers. Another boy, a future banker, said he would become a businessman.

“Then Barry said he would become president and order the soldier to guard him and the businessman to use his money to build him something,” Mr. Januadi said. “We told him, ‘You cheated. You didn’t give us those details.’ ”
“But we all became what we said we would,” he said.