Bobby Castillo, the man who taught Fernando Valenzuela the screwball, helping put into motion one of the most memorable periods in Los Angeles Dodgers' history, died Monday. He was 59.

Castillo, who pitched in the majors for nine years and was a member of the Dodgers' 1981 World Series championship team, died of cancer in a Los Angeles-area hospital, the team announced.

The thick-mustached Castillo had a 38-40 record with a 3.94 earned-run average during his career, all but three years of it spent pitching for his hometown Dodgers.

Robert Ernie Castillo was born April 18, 1955, in Los Angeles. He went to Lincoln High School in Lincoln Heights and was drafted by the Kansas City Royals as a third baseman. Cut by the Royals, the right-hander was pitching in a semipro game in Boyle Heights in 1976 when he had the very good fortune of striking out Mike Brito on a screwball.

The lives of Castillo, Brito, and eventually Valenzuela and the Dodgers, would never be the same.

Brito, a former Mexican league player turned scout, signed Castillo to pitch in the Mexican league, and in a short time Dodgers General Manager Al Campanis signed Brito as a scout and Castillo to pitch. That led to Brito signing Valenzuela out of the Mexican league to the Dodgers.

Campanis wanted Valenzuela to learn a third pitch, so he called on Castillo to teach him the screwball. History was set in motion.

When Valenzuela won the National League Rookie of the Year and Cy Young awards in 1981, helping the Dodgers to the title, Castillo was a member of the bullpen.

In 1979, the affable Castillo survived a spring training incident in which he ran his car into a bridge railing at 5 a.m. in Vero Beach, Fla., injuring a leg and incurring the wrath of Manager Tommy Lasorda.

Castillo's finest season with the Dodgers may have been in 1980, when he appeared in 61 games as a reliever, going 8 and 6 with a 2.75 ERA and five saves.

When the Dodgers traded him to the Minnesota Twins in 1982, Castillo said: "It's going to be hard not to put that Dodger uniform on again. They've all been great, even the people in the stands who booed. They booed great."

Castillo spent three years with the Twins but returned to the Dodgers for one final season in 1985. In recent years he had been a member of the Dodgers' community services team.

Castillo is survived by his mother, Nellie; daughters Mellanie and Sara; son Robert III; two grandchildren and his sister, Lorraine.

news.obits@latimes.com

Twitter: @stevedilbeck