EBay is spinning off its online payment service PayPal as a separate company.

The move, which has long been urged by some Wall Street analysts, was announced Tuesday. It is expected to take place in the second half of 2015.

The news sent shares of eBay (EBAY) up more than 6% in early trading.

"This is the best path for delivering sustainable shareholder value," the company said in its announcement.

EBay also announced a new executive team for both companies, with current CEO John Donahoe and chief financial officer Bob Swan planning to leave the company after the split.

Devin Wenig, currently president of eBay Marketplaces, will become CEO of the new eBay. The company also announced the appointment of Dan Schulman, an executive of American Express (AXP), to be the president of the PayPal unit until the split, and to be CEO of the independent PayPal. PayPal had lost its former chief to Facebook in June.

Earlier this year, activist investor Carl Icahn urged eBay to spin off PayPal, and was ready to put it up for a vote of shareholders. He also was proposing two of his own candidates for the eBay board.

At the time Donahoe urged against a split, arguing that "eBay is a big contributor to PayPal's growth and expansion." He also said the split would be a "distraction" for the companies.

Icahn dropped his proxy fight after eBay agreed to appoint David Dorman, founding partner of venture capital firm Centerview Capital Technology, to the board. Dorman was chairman of Motorola (MSI) when it split into two separate businesses.

Related: Will Apple kill PayPal?

PayPal started out as an independent company. Its founders included Peter Thiel, now a billionaire investor who was subsequently an early backer of Facebook (FB) and Elon Musk, who has gone to fame and success as CEO of electric car maker Tesla Motors (TSLA) and private space exploration business Space X.

EBay bought PayPal for $1.5 billion in 2002. In a sector littered with failed big dollar purchases, the eBay purchase of PayPal is widely seen as one of the most successful tech acquisitions ever. Last year, it accounted for about 40% of eBay's total revenue. It facilitates one in every six dollars spent online today, and total payment volume grew 26% in the last six months to $203 billion.

The business could grow even more as consumers start making more mobile online payments. Mobile payments, including consumers using their phones to pay at traditional retailers, are likely to reach $3.5 billion this year, according to research firm eMarketer. But that is forecast to grow to $118 billion annually within four years.

But the company also faces increased competition in that space. Earlier this month, Apple (AAPL) announced Apple Pay, a new way to make payments with your iPhone.