DALLAS -- Parents and students got quite a shock Wednesday morning, when a seven-foot alligator was captured just feet from a Dallas middle school.

A sheriff's deputy on routine patrol spotted the gator at about 2 a.m, in a field next to D. A. Hulcy Steam Middle School. That's at South Polk Street, near East Danieldale Road and Interstate 20, in the Redbird area of Dallas.

Dallas police and the Texas Game Warden were called and the animal was captured just before 4:30 a.m., but not without putting up a fight.

Our cameras were rolling as it snapped and rolled, which alligators do in self-defense, before it was eventually loaded into the Dallas County Game Warden's truck.

Students arrived for class hours later.

Parents who watched the capture on the morning news couldn't believe it.

"Like how did it get here, where did it come from, it just appeared in the middle of the night," exclaimed parent Tara Wilder. "It just came out of the blue, and it’s like, 'Hey y'all, I’m here."

No one News 8 spoke with has seen an alligator in the area before.

School officials said there is a small creek and pond nearby, but there's no word on where the gator came from.

The Texas Game Wardens office says it's not unusual for gators to wander off and get displaced after periods of heavy rain.

It is believed to be an isolated incident.

The alligator was taken to an alligator preserve in Dallas County, where it will live from now on, according to the game wardens office.

The school day continued as usual, though the principal said kids would not be allowed on the fenced soccer field, near the area where the gator was discovered, as a precaution.

The middle school just opened in the 2015-2016 school year with about 240 sixth grade students.