Here are some reactions posted online and social media from local police:

Harrisburg Police:"Our thoughts and prayers go out to the families and colleagues of the police officers killed in the line of duty protecting and serving peaceful protesters in Dallas. We also pray for the quick and full recovery of all those injured. Our thoughts and prayers also go out to the families of Philando Castile and Alton Sterling. No one is ever prepared to lose a loved one. I have experienced this personally, and I am truly sorry for your loss." - Police Chief Thomas Carter

York City Police:"My thoughts are with the Dallas PD. I am stunned that some may feel that attacking peacekeepers is a viable solution to their own perceived grievances. We are humans like everyone else and are not perfect like everyone else but violence against law enforcement must not be tolerated by our communities and their leaders." - Police Chief Wes Kahley

Silver Spring Township Police: "The Silver Spring Township Police Department is blessed to serve a community that has always been supportive of all its officers. We strive daily to earn its continuation and to foster its growth to new members of our community and visitors passing through. Our officers are trained professionals who carry out their sworn oaths with pride and respect to everyone. They are still human beings who are affected by what is going on nationally, while cautious and alert we will maintain treating everyone with equality and fairness. A sincere and heartfelt "Thank You" to all for their support during these difficult times (and at all times.) We extend our deepest sympathies to the Dallas Police Department, the Dallas Area Rapid Transit Police Department, their officers, their families, and their community." - Silver Spring Township Police

West Shore Regional Police: "Our hearts go out to all the Officers involved in the Dallas Incident. Our goal as officer(s) is to go home at the end of the night to our families, just like everyone else.To the citizens of the communities we serve, please realize that no matter how many cowardly attacks occur on police, we will be here to respond to your calls for assistance! This will not stop us from being there!" - West Shore Regional Police

Lower Allen Township Police:

"If officers seem a little on edge, one need only look to the news to know why. If conversations are short, or tones are terse, you will know why. We are an agency of professionals, but also an agency of human beings. It is impossible to be unaffected by recent events. We are thankful for the support we have from our community and are committed to maintaining that. We are also keeping those impacted by the events in Dallas in our thoughts and prayers." - Lower Allen Township Police

Northern York County Regional Police:

"Our thoughts and prayers go out to Dallas Police Department." - Northern York County Regional Police