Shares of biotechnology company Spark Therapeutics slid nearly 30 percent Tuesday after the company reported the results of a small trial for an experimental gene therapy treatment for hemophilia that reduced bleeds in most patients but sent one to the hospital.

The Philadelphia-based company said that its treatment for hemophilia A reduced bleeds and the need for therapeutic infusions by 97 percent in a trial of 12 patients, and that it plans to start a late-stage clinical trial in the fourth quarter.

At the highest dose in the study, which the company plans to use in its phase 3 trial, five of seven patients saw levels of the protein important in hemophilia A restored to an average of 30 percent of normal, the company said when it reported second-quarter financial results.

Two patients, though, had an immune response that caused the level of that protein to decline to less than 5 percent. One of the patients was admitted to the hospital in what Spark described as a serious adverse event.

"The immune response in the two participants is a significant concern," SunTrust analyst Edward Nash wrote in a note to investors, saying it's unlikely Spark will further increase the dose of the drug.

Hemophilia is a rare disorder in which the blood doesn't clot properly. It's currently treated with drugs that replace proteins — called Factor VIII, for hemophilia A, and Factor IX, for the less-common hemophilia B — known as clotting factors. About 20,000 people in the U.S. are estimated to have hemophilia, according to the Centers for Disease Control and Prevention.

New approaches, from Spark and competitors like BioMarin, aim to deliver healthy copies of the gene that makes the proteins important in hemophilia. The goal of what's called gene therapy is to dramatically improve, or even cure, the disease with just one treatment (Spark's stock ticker, accordingly, is ONCE). BioMarin's shares were up 6.4 percent Tuesday.

Jefferies analyst Michael Yee said the data "will perplex investors," and Spark's "competitive profile will be debated again" compared with data from a more advanced drug from BioMarin.

Wall Street was looking for a level of 30 percent expression of Factor VIII or more to consider the trial a success, Evercore ISI analyst Steven Breazzano wrote in a July 30 research note, "provided that the results are not highly variable."

Spark also released its second-quarter results before the market opened Tuesday, reporting $25.2 million in total revenue for the three months ended June 30, compared with $1.5 million during the same period last year. Spark also swung to an $80.2 million profit during the second quarter, from a $74.4 million loss in 2017. More than $20 million of its revenue came from agreements it has with Pfizer, Spark said.

"The totality of the data we're really pleased with and encouraged by, and it's driving our decision and plans to move into a phase 3 trial starting in the fourth quarter," Spark Chief Executive Officer Jeff Marrazzo told CNBC in a telephone interview.

Before Tuesday, Spark's stock had gained more than 50 percent this year, following a massive drop in December on an earlier look at four patients in this clinical trial. After a presentation at the American Society of Hematology conference (ASH) in Atlanta, Spark's stock dropped 35 percent in a single day as investors worried about a lack of uniformity in the results, and were more encouraged by an update from BioMarin.

Marrazzo acknowledged investors are likely to have questions about the two patients who experienced immune reactions affecting their clotting factor levels, but he said the company now has a clear understanding of what caused previous variability in the results, and a path forward. It plans to dose patients prophylactically with steroids in the phase 3 trial in hopes that will suppress any immune responses.

"The real difference from ASH was that, frankly, at that point we were still learning and didn't have an answer for the etiology of what was happening," Marrazzo said. "Here we know exactly what's happening in these two patients and we have a plan that we're confident in to correct it."

For the five other patients in the highest-dose group (2x10e12 vector genomes per kilogram), Factor VIII expression levels ranged from 16 to 49 percent.

The first patients treated in the trial have been followed for more than a year, and have shown stable levels of Factor VIII expression for up to 66 weeks, the company said.

"These early data further support the dramatic impact on patient outcomes that can result from factor activity levels above 12 percent and bring us closer to our goal of one day eliminating spontaneous bleeding altogether, while potentially freeing patients with hemophilia A from the need for regular infusions," Spark's head of research and development, Dr. Katherine High, said in a statement.

Competitor BioMarin already began late-stage tests of its hemophilia A gene therapy; Spark is a few months behind.

"At this point we are just going to indicate our plans to move into phase 3 starting in the fourth quarter; I believe they initiated their phase 3 at the beginning of this year," Marrazzo told CNBC. (BioMarin dosed the first patient in one of its trials in December, while the other began in the first quarter.) "That's the difference at this point."