President Obama arrived Friday night in a Kenyan capital transformed since his last visit in 2006 — a city of rising glass towers, new shopping malls and brightly lit offices of multinational corporations.

Even the site of Obama’s first public speech here at a global entrepreneurship conference on Saturday, a venue where he is expected to embrace Kenya as a nation on the rise and part of a region of viable commercial partners, is a symbol of the nation’s economic ascent.

Kenya, East Africa’s largest economy, is home to a growing technology sector and the continental headquarters of companies such as General Electric. The country’s economy is expected to grow about 6.5 percent this year, and it has a steadily expanding middle class.

The Obama administration has made economic growth a central tenet of its Africa strategy. It was the primary theme of last year’s U.S.-African Leaders Summit, and the administration has rewarded countries with sound economic policies through its aid programs.

“He’s the first U.S. president to really view Africa not just through a humanitarian lens,” said Monde Muyangwa, director of the Africa Program at the Woodrow Wilson Center, “but through the lens of economic opportunity.”

Beyond the capital’s rising skyline, this country is still reckoning with a host of challenges that could dim its economic prospects.

Attacks by armed groups, namely Somalia-based al-Shabab, have badly hurt Kenya’s tourism sector, a pillar of the economy. Many Kenyans worry that another attack, particularly in the capital, could damage foreign investment, which nearly doubled last year but remains a small fraction of the country’s gross domestic product.

Energy prices remain higher than in neighboring countries, and corruption still plagues much of the public sector, where endeavors such as transporting goods and registering a business are often subject to bribes. Last year, Kenya was ranked at 145 of 175 on Transparency International’s Corruption Perceptions Index.

Still, Kenyan officials are confident that they are entering a period of strong growth. And they plan to use Obama’s visit as a chance to show off their progress.

“This is the greatest opportunity,” said Moses Ikiara, the chairman of the Kenya Investment Authority. “It means more air time for our marketing campaign. It means people around the world will be looking at Kenya.”

There are a variety of reasons for the rising economic prospects here, including improved political stability, increased investment from foreign countries, particularly China, and expanded access to capital that has helped unleash an entrepreneurial boom.

Kenya lacks the natural resources of oil-rich Nigeria, now the continent’s largest economy. It isn’t nearly as industrialized as South Africa, the second-largest. But the country of 45 million has proved to be a place of innovation and ambition.

“They have not made the progress on the basis of oil, or gas, or gold, or nickel, or chrome,” said Johnnie Carson, who was the State Department’s top African affairs official during Obama’s first term and served as U.S. ambassador to Kenya between 1999 and 2003. “It’s been human capital and ingenuity, and we see a lot of that.”

For years, that ingenuity was stymied by political instability. Hundreds of people were killed and thousands displaced during weeks of ethnic violence that followed a disputed 2007 election featuring candidates Mwai Kibaki and Raila Odinga. Uhuru Kenyatta, then a Kibaki supporter and now president, was indicted by the International Criminal Court for allegedly inciting violence.

That wasn’t the first time that the country had suffered from post-election violence, and it was a blow to both domestic and foreign investment — a reason for many to be wary about Kenya’s future. (The case against Kenyatta was dropped last year, though the deputy president, William Ruto, still faces charges at the international court).

After Kenya’s 2013 presidential election proved much more peaceful, investment picked up. The technology sector flourished.

An example of Kenya’s technological progress is the mobile banking system, called M-Pesa. While other developing countries have imposed onerous regulations on mobile banking, that wasn’t the case with M-Pesa, which was launched by telecommunications company Safaricom. It is now used by both the country’s poorest and richest citizens for depositing salaries, buying groceries and even making large-scale loans.

The government has announced a 20-year plan to encourage private enterprise, including lowering energy prices, reducing taxes and improving infrastructure.

“It’s getting easier and easier to do business here,” said Jay Ireland, the head of General Electric’s Africa division, which relocated its headquarters from Johannesburg to Nairobi in 2011.

Barriers to growth

As in much of Africa, Chinese investment here far outpaces what’s coming from the United States. Some of the biggest infrastructure projects underway in Kenya — a national superhighway and a transnational railway starting in Mombasa — are financed by China.

“What’s attractive about Chinese investment is that they’re very quick and they provide flexible financing arrangements,” Ikiara said.

Ironically, it’s those Chinese-built infrastructure projects that Kenya is now using to attract investment from the United States and Europe, making the case that better roads and railways will make it easier and cheaper to do business here.

Poor infrastructure is an old challenge here, and one that bedevils much of the continent. But even that problem is now seen as surmountable by investors, worth dealing with to win the prize of a largely untapped market.

“If you want your package to arrive on time, you need to build your own delivery system,” said Jeremy Hodara, who in 2011 launched Jumia, now considered Africa’s equivalent of “You can’t rely on local post offices.”

Corruption poses another barrier to growth and is hardly hidden from view in Kenya, where police often invent reasons for pulling over vehicles, including the many large trucks transporting goods from the Indian Ocean port of Mombasa to countries across East Africa.

The Kenyan government has recently pursued an anti-corruption campaign, acknowledging that the problem needs to be tackled to attract more foreign investment, a drive that U.S. officials welcomed ahead of Obama’s visit.

“The will to fight this problem is very strong,” Ikiara said.

But many business executives have been unimpressed by the results of the campaign, which has been difficult to implement as Kenya has decentralized power from the president’s office to local governments in recent years.

“The president’s heart is in the right place, but he’s pressing buttons and for some of the buttons there’s no reaction,” said Aly-Khan Satchu, a prominent Kenyan investor.

After two days in Kenya, Obama will visit Ethiopia, whose economy is expected to grow at 8.7 percent this year, according to the International Monetary Fund.

Unlike Kenya, Ethiopia has taken a state-driven economic approach modeled on China’s system, with many of its key sectors — including telecommunications, banking, insurance and transportation — either state-owned or virtually controlled by the ruling party.

Obama is likely to press Ethiopian authorities to liberalize aspects of the economy. Ethiopia’s ambassador to the United States, Girma Birru, said in an interview in Washington that his country is eager to see more American trade and investment, in addition to the development aid it has traditionally received.

He added that Ethiopians “are preparing ourselves to satisfy the American businesses, learning the way they are doing business here. Because if they are going to be treated differently from how they would be treated in their own country, then they would be reluctant” to invest.

The Obama administration’s most significant development project on the continent so far is the Power Africa program, which aims to add 30,000 megawatts of power to be accessed by 60 million households and businesses. But the program won’t be close to completion by the time Obama finishes his second term, leaving its implementation in question.

Obama’s national security adviser Susan Rice told reporters this week that Power Africa, like George W. Bush’s program to fight AIDS in Africa, “is building up in strength and capacity, will double the amount of power to the African continent.”

U.S. officials were right to focus relations with Africa on trade and investment given the demographic bulge of young people on the continent, said Amadou Sy, director and senior fellow at the Brookings Institution’s Africa Growth Initiative. He noted that the World Bank projects an average of 4 percent growth in GDP for sub-Saharan Africa in 2015, and at a time when the population growth averages 2.4 percent per year, that is “really, really, really, insufficient.”

“So we need to grow faster and then we need more investment, we need more trade, and we need more infrastructure,” Sy said.