B737-700
Flight Crew Air Transport Pilot (ATP); Flight Crew Multiengine; Flight Crew Instrument
Flight Crew Last 90 Days 130; Flight Crew Type 754
Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Clearance; Inflight Event / Encounter Other / Unknown
Flight Crew Regained Aircraft Control; Flight Crew Overcame Equipment Problem
Aircraft
Climbing through FL180 I engaged CMD (Command) A autopilot. When I pressed the button the airplane instantly had a loud banging noise; jolted very aggressively; nosed down; and started oscillating.  It was almost to the point I thought I was going to accomplish upset recovery procedures.  I was quickly able to level the airplane off and safely hand fly.  We contacted Maintenance and unanimously agreed that the airplane was safe enough to continue to hand fly the plane for the duration of the flight. Maintenance asked if we tried autopilot B. The jolt and aircraft response was significant enough that we did not want to try arming the autopilot again.  We safely hand flew the aircraft back to ZZZ1. In our debrief we discussed that for a split second we initially thought it was so severe that we were losing aircraft control. We were greatly startled and hands were shaking for a good 5-10 minutes after the event happened. We were scheduled to fly to ZZZ2 after the flight; arriving the next morning. We hit an emotional lull after the flight and we both determined we were not emotionally; nor physically; fit to continue our pairing.  We called in fatigued and were given hotel rooms immediately.
We were climbing through 180 out of ZZZZ.  The CA (Captain) went to engage CMD (Command) A and the aircraft made a loud bang and had a violent nose down control input. It was so severe that we thought the flight attendant could have been injured.  It was so bad for a moment I thought that we might have hit something mid-air.  I was completely shaken up and so was the Captain. We refused to attempt to re-engage any autopilot. We were just about to divert but we had Dispatch run the numbers for us at non-RVSM altitude. We calculated 6.0 remf on this 700 so we opted to hand fly it. We worked in 30 minute shifts. The arrival was busy with many changes enroute. We were both shaking at the initial event and were completely calmed down enroute but we both started to feel drained after the adrenaline started to wear off. We were both obviously not fit for our next leg which was scheduled to arrive after midnight into ZZZ1. We both got a hotel at ZZZ even though I could have commuted home that evening; I was toast at that point and just went to bed.
B737-700 air carrier flight crew reported autopilot malfunction inflight.