By Maria Armental

Tesla Inc. said it would enact a 5-for-1 stock split after a share-price surge over recent months vaulted the electric-vehicle maker to the status of most-valuable car company as Chief Executive Elon Musk navigated the pandemic.

Enthusiasm in Tesla's stock has been fueled by four consecutive quarters of profit. The company's shares rose more than 6% in after-hours trading following the announcement after closing lower Tuesday at $1,374.39.

Tesla's move follows one from Apple Inc., which last month said its board had approved a 4-for-1 stock split, aiming to make the stock more accessible to a broader base of investors.

Tesla, which started trading publicly in 2010, has seen its stock more than triple in value this year -- and rise nearly sixfold over the past 12 months.

Mr. Musk, who has criticized the company's stock price as too high, has said on Twitter that a split was worth discussing at the company's annual shareholder meeting. That meeting has been pushed back to September amid the pandemic. Several investors had urged Mr. Musk to pursue a stock split.

The rise in Tesla shares has been driven in part by the start of production late last year of the Model 3 sedan at a new factory in China. Those deliveries helped offset the setback Tesla suffered in March when officials in the San Francisco Bay Area ordered it to stop production at its lone U.S. car assembly plant to battle the Covid-19 outbreak.

Tesla this year also has started delivering the Model Y compact sport-utility vehicle. The SUV's order backlog secured before the pandemic helped sustain deliveries when many prospective new car buyers were stuck at home.

The company, as part of Mr. Musk's effort to turn Tesla from a niche car company into a mainstream vehicle maker, is pressing ahead with the construction of its first European factory near Berlin and last month said it would build another in the U.S. in Austin, Texas, one of the few new major car assembly plants to be built in the U.S. in the past decade.

Stock splits don't change anything fundamentally about a company or its valuation, although they tend to generate a short-term pop in a company's stock price. They can also help entice investors who might be put off by a high share price. But brokerages such as Charles Schwab Corp. now give clients the option of buying a fraction of a share for as little as $5, opening up a range of pricey stocks to mom-and-pop investors.

Once common among companies when their shares topped $100, stock splits became less prevalent after the dot-com bust in 2000. This year just three companies in the S&P 500, including Apple, have unveiled plans for share splits, down from 102 in 1997 and seven in 2016, according to Charles Schwab. Executives from Target Co. and PepsiCo Inc. are among those that have recently dismissed the need for a stock split.

Tesla said it was pursuing the split "to make stock ownership more accessible to employees and investors." The company said shareholders on Aug. 21 will benefit from the split and that its stock will trade on the adjusted basis on Aug. 31.

Michael Wursthorn and Tim Higgins contributed to this article.

Write to Maria Armental at maria.armental@wsj.com