Margaret Klein, a Weymouth native and career Navy officer, has been promoted to the rank of two-star rear admiral.

Klein, a 1981 graduate of the U.S. Naval Academy, is the chief of staff for the United States Cyber Command, which conducts military cyberspace operations. She was promoted to rear admiral (upper half) in a ceremony at Fort Meade, Md., on Thursday.

Klein did multiple tours with Fleet Air Reconnaissance Squadron 3, forward-deployed with the USS Kitty Hawk Battle Group during operations Enduring Freedom and Iraqi Freedom. She also served as chief of staff for the USS Dwight D. Eisenhower Strike Group.