TOKYO — NEC, once the leading cellphone maker in Japan, said on Wednesday that it would quit making smartphones, acknowledging that it had failed to keep pace with the likes of Apple and Samsung Electronics.

The retreat in the face of competition from an American and a South Korean company highlighted the country’s shift from electronics industry leader to laggard over the course of the last decade.

“We were late to enter the smartphone market, and we were unable to develop attractive products,” Isamu Kawashima, the chief financial officer of NEC, said at a news conference here. “That’s what it comes down to.”

Like other Japanese phone makers, NEC clung to old-fashioned flip phones — great for making phone calls, taking pictures or playing simple games, but not for much else — as rivals elsewhere were developing smartphones that put the entire Internet and more in users’ pockets. The first NEC smartphone did not appear until 2011, four years after Apple’s iPhone.