A rotary solenoid, comprising: an electromagnetic coil (40, 140) including a major magnetic pole (41, 141) arranged at a center thereof; two axially-magnetized magnets (51, 52, 71, 72, 81, 82, 123, 124); a swing yoke (50, 70, 80, 122) including a planar surface portion to which the magnets (51, 52, 71, 72, 81, 82, 123, 124) are fixed in a juxtaposed state such that magnetic poles differing from each other face the electromagnetic coil (40, 140) across air gaps; and an output shaft (20, 121) arranged in a perpendicular or substantially perpendicular relationship with the planar surface portion and in a parallel or substantially parallel relationship with the major magnetic pole (41, 141) so as to rotatably support the swing yoke (50, 70, 80, 122), the swing yoke (50, 70, 80, 122) being arranged to be swung in forward and reverse directions at a specified angle θ with respect to a centerline interconnecting a center of the output shaft (20, 121) and a center of the major magnetic pole (41, 141); characterized in that a fixed yoke (30, 60, 130) is arranged to support the electromagnetic coil (40, 140) and magnetically coupled with the major magnetic pole (41, 141); the fixed yoke (30, 60, 130) includes projection portions (31, 32, 61, 62, 131, 132) extending upward from opposite sides of the fixed yoke (30, 60, 130) near an outer periphery of the electromagnetic coil (40, 140) so as to have a same or substantially same height as the major magnetic pole (41, 141); the projection portions (31, 32, 61, 62, 131, 132) are arranged such that, when an inner edge of one of the magnets comes closest to the major magnetic pole (41, 141) within a swing range of the swing yoke (50, 70, 80, 122), one of the projection portions comes closest to an outer edge of another one of the magnets arranged at an opposite side from the inner edge; and the projection portions (31, 32, 61, 62, 131, 132) of the fixed yoke (30, 60, 130) are arranged into a shape conforming to the outer edges of the magnets so that, when the swing yoke is swung, each of the projection portions (31, 32, 61, 62, 131, 132) stands face-to-face with the outer edge of each of the magnets coming close to each of the projection portions (31, 32, 61, 62, 131, 132) over substantially an entire length thereof. an electromagnetic coil (40, 140) including a major magnetic pole (41, 141) arranged at a center thereof; two axially-magnetized magnets (51, 52, 71, 72, 81, 82, 123, 124); a swing yoke (50, 70, 80, 122) including a planar surface portion to which the magnets (51, 52, 71, 72, 81, 82, 123, 124) are fixed in a juxtaposed state such that magnetic poles differing from each other face the electromagnetic coil (40, 140) across air gaps; and an output shaft (20, 121) arranged in a perpendicular or substantially perpendicular relationship with the planar surface portion and in a parallel or substantially parallel relationship with the major magnetic pole (41, 141) so as to rotatably support the swing yoke (50, 70, 80, 122), the swing yoke (50, 70, 80, 122) being arranged to be swung in forward and reverse directions at a specified angle θ with respect to a centerline interconnecting a center of the output shaft (20, 121) and a center of the major magnetic pole (41, 141); characterized in that a fixed yoke (30, 60, 130) is arranged to support the electromagnetic coil (40, 140) and magnetically coupled with the major magnetic pole (41, 141); the fixed yoke (30, 60, 130) includes projection portions (31, 32, 61, 62, 131, 132) extending upward from opposite sides of the fixed yoke (30, 60, 130) near an outer periphery of the electromagnetic coil (40, 140) so as to have a same or substantially same height as the major magnetic pole (41, 141); the projection portions (31, 32, 61, 62, 131, 132) are arranged such that, when an inner edge of one of the magnets comes closest to the major magnetic pole (41, 141) within a swing range of the swing yoke (50, 70, 80, 122), one of the projection portions comes closest to an outer edge of another one of the magnets arranged at an opposite side from the inner edge; and the projection portions (31, 32, 61, 62, 131, 132) of the fixed yoke (30, 60, 130) are arranged into a shape conforming to the outer edges of the magnets so that, when the swing yoke is swung, each of the projection portions (31, 32, 61, 62, 131, 132) stands face-to-face with the outer edge of each of the magnets coming close to each of the projection portions (31, 32, 61, 62, 131, 132) over substantially an entire length thereof.