diff --git a/rsvg-cairo-draw.c b/rsvg-cairo-draw.c
index b1f56e7..ee1038d 100644
--- a/rsvg-cairo-draw.c
+++ b/rsvg-cairo-draw.c
@@ -384,6 +384,8 @@ _set_source_rsvg_pattern (RsvgDrawingCtx * ctx,
 
     /* Draw to another surface */
     render->cr = cr_pattern;
+    if (opacity != 0xff)
+        cairo_push_group (cr_pattern);
 
     /* Set up transformations to be determined by the contents units */
     rsvg_state_push (ctx);
@@ -396,6 +398,11 @@ _set_source_rsvg_pattern (RsvgDrawingCtx * ctx,
     /* Return to the original coordinate system */
     rsvg_state_pop (ctx);
 
+    if (opacity != 0xff) {
+        cairo_pop_group_to_source (cr_pattern);
+        cairo_paint_with_alpha (cr_pattern, opacity / 255.0);
+    }
+
     /* Set the render to draw where it used to */
     render->cr = cr_render;
 
