Eli Lilly plans to take a minority stake of its Elanco Animal Heath unit public, the pharmaceutical company said Tuesday.

Elanco's portfolio includes treatments for both livestock and pets.The decision comes after a strategic review of the business, which had weighed on Lilly's performance.

Lilly said it expects to offer a less than 20 percent stake in the new company in an initial public offering. Following the IPO, the company plans to divest its remaining ownership through a tax-efficient transaction.

Lilly share prices rose 4 percent Tuesday. At one point they were up nearly 6 percent, buoyed by the IPO plans and second-quarter earnings that were better than expected.

"Based on our strategic review, we concluded that after-tax value for Lilly shareholders would be maximized by pursuing an initial public offering of Elanco," Lilly CEO David Ricks said in a statement. "We believe this will allow Elanco to efficiently deploy its resources to those growth opportunities that best serve its customers. In addition, this will provide Lilly even greater focus on the human pharmaceutical business to pursue our purpose of creating life-changing medicines for patients."

Lilly expects to file a registration statement with the Securities and Exchange Commission in coming weeks and complete the IPO process in the second half of the year.

Correction: Eli Lilly plans to take public a less than 20 percent stake in its Elanco Animal Health unit. An earlier version incorrectly stated the company would hold a minority stake in the unit after the IPO.