A fan casually walked to home plate and approached Philadelphia hitter Brad Miller for a handshake before being apprehended, and the Phillies later beat the Pittsburgh Pirates 2-1 Sunday on Rhys Hoskins' home run in the 11th inning.

Moments after Bryce Harper argued a called third strike and Hoskins spiked his bat after being hit by a pitch, things turned bizarre in the sixth inning at PNC Park.

More Images
Police detain a man who walked across the field and approached Philadelphia Phillies' Brad Miller as he came to bat in the sixth inning of a baseball game against the Pittsburgh Pirates, Sunday, July 21, 2019, in Pittsburgh. The police took the man from the field and play continued. (AP PhotoKeith Srakocic)

A fan casually walked to home plate and approached Philadelphia hitter Brad Miller for a handshake before being apprehended, and the Phillies later beat the Pittsburgh Pirates 2-1 Sunday on Rhys Hoskins' home run in the 11th inning.

Philadelphia Phillies' Rhys Hoskins hits a solo home run in the eleventh inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. The Phillies won 2-1. (AP PhotoKeith Srakocic)

Miller then grounded into an inning-ending double play.

Philadelphia Phillies' Bryce Harper, left, argues a called third strike with home plate umpire Brian May in the sixth of a baseball game against the Pittsburgh Pirates, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Drew Smyly made his first start with the Phillies, allowing one run and four hits in six innings. He also struck out.

Philadelphia Phillies starting pitcher Drew Smyly throws against the Pittsburgh Pirates during the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Melky Cabrera put the Pirates ahead 1-0 in the first with an RBI single. The Phillies tied it in the fourth when César Hernández came out of a 25-minute rain delay and singled home Harper.

Pittsburgh Pirates starting pitcher Dario Agrazal throws against the Philadelphia Phillies during the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

TRAINER'S ROOM

Philadelphia Phillies' Bryce Harper (3) loses his helmet as he digs for second base while Pittsburgh Pirates center fielder Starling Marte, center, throws the ball to second in in the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. Harper was safe with a double. (AP PhotoKeith Srakocic)

Pirates: RHP Trevor Williams (3-3, 5.17) could start against St. Louis on Monday if well enough after being scratched from his last projected start on Saturday because of flu-like symptoms. An official starter has not been announced.

That's when a man carrying a cellphone came out of the crowd and strolled toward Miller in the batter's box. Miller backed away and the man kept walking, leisurely getting near the Phillies' dugout on the first base side, where he was handcuffed by security personnel and led away.

Police detain a man who walked across the field and approached Philadelphia Phillies' Brad Miller as he came to bat in the sixth inning of a baseball game against the Pittsburgh Pirates, Sunday, July 21, 2019, in Pittsburgh. The police took the man from the field and play continued. (AP PhotoKeith Srakocic)

Police detain a man who walked across the field and approached Philadelphia Phillies' Brad Miller as he came to bat in the sixth inning of a baseball game against the Pittsburgh Pirates, Sunday, July 21, 2019, in Pittsburgh. The police took the man from the field and play continued. (AP PhotoKeith Srakocic)

Miller then grounded into an inning-ending double play.

Hoskins hit his 21st home run, connecting off Chris Stratton (1-3). The drive came right after Harper again seemed displeased with plate umpire Ben May when striking out looking to start the inning.

Phillies reliever Ranger Suárez (3-0) got Starling Marte to ground out to end the 10th, stranding Adam Frazier at third, and worked around a hit in the 11th.

Philadelphia Phillies' Rhys Hoskins hits a solo home run in the eleventh inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. The Phillies won 2-1. (AP PhotoKeith Srakocic)

Philadelphia Phillies' Rhys Hoskins hits a solo home run in the eleventh inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. The Phillies won 2-1. (AP PhotoKeith Srakocic)

Drew Smyly made his first start with the Phillies, allowing one run and four hits in six innings. He also struck out.

The 30-year-old lefty was 1-5 with an 8.42 ERA in nine starts and four relief appearances this year for Texas, which released him on June 25. Smyly signed a minor league contract with Milwaukee on July 1, went 1-0 with a 4.97 ERA in three starts for Triple-A San Antonio, then on Thursday exercised his right to be released.

Pirates starter Dario Agrazal allowed one run on three hits with five strikeouts in six innings. The 24-year-old rookie has given up a combined eight runs (seven earned) in 28 innings through his first five starts.

Philadelphia Phillies' Bryce Harper, left, argues a called third strike with home plate umpire Brian May in the sixth of a baseball game against the Pittsburgh Pirates, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Philadelphia Phillies' Bryce Harper, left, argues a called third strike with home plate umpire Brian May in the sixth of a baseball game against the Pittsburgh Pirates, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Melky Cabrera put the Pirates ahead 1-0 in the first with an RBI single. The Phillies tied it in the fourth when César Hernández came out of a 25-minute rain delay and singled home Harper.

ROSTER MOVE

Phillies: RHP Fernando Salas was designated for assignment to open a roster spot for Smyly. Salas (0-0, 6.75) allowed two runs on eight hits in 2 2/3 innings across three appearances for Philadelphia this season. RHP Nick Pivetta moved to the bullpen to make room for Smyly in the rotation.

Philadelphia Phillies starting pitcher Drew Smyly throws against the Pittsburgh Pirates during the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Philadelphia Phillies starting pitcher Drew Smyly throws against the Pittsburgh Pirates during the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

TRAINER'S ROOM

Phillies: Segura left after the top of the fourth inning because of heel soreness. He was 0 for 2 before Scott Kingery moved from center field to replace Segura at shortstop.

UP NEXT

Phillies: RHP Aaron Nola (8-2, 3.77) starts at Detroit on Tuesday. Since last losing in a 2-1 defeat against Miami on June 21, Nola is 2-0 in five starts while allowing seven runs (six earned) in 32 2/3 innings.

Pittsburgh Pirates starting pitcher Dario Agrazal throws against the Philadelphia Phillies during the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Pittsburgh Pirates starting pitcher Dario Agrazal throws against the Philadelphia Phillies during the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. (AP PhotoKeith Srakocic)

Pirates: RHP Trevor Williams (3-3, 5.17) could start against St. Louis on Monday if well enough after being scratched from his last projected start on Saturday because of flu-like symptoms. An official starter has not been announced.

More AP baseball: https://apnews.com/MLB and www.twitter.com/AP_Sports

Philadelphia Phillies' Bryce Harper (3) loses his helmet as he digs for second base while Pittsburgh Pirates center fielder Starling Marte, center, throws the ball to second in in the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. Harper was safe with a double. (AP PhotoKeith Srakocic)

Philadelphia Phillies' Bryce Harper (3) loses his helmet as he digs for second base while Pittsburgh Pirates center fielder Starling Marte, center, throws the ball to second in in the first inning of a baseball game, Sunday, July 21, 2019, in Pittsburgh. Harper was safe with a double. (AP PhotoKeith Srakocic)